2020-06-03から1日間の記事一覧

【LeetCode】Easy: Two Sum

Two Sum https://leetcode.com/problems/two-sum/ 自分の回答 Swift Runtime: 12 ms class Solution { func twoSum(_ nums: [Int], _ target: Int) -> [Int] { let dic = Dictionary<Int, Int>(uniqueKeysWithValues: nums.enumerated().map{($0, $1)}) for (i, num) </int,>…