Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]. 思路:用字典(hashmap)存已经遍历过的数字,就不用再遍历一次了。<k,v>=<nums[i],i>。
確定! 回上一頁