# 11/15 头条前端 ## 两数之和 O(n)的做法 ### 哈希表 ```js const twoSum = function (nums, target) { const arrMap = new Map() for (let i = 0; i < nums.length; i++) { const result = target - nums[i]; if (arrMap.has(result)) { return [arrMap.get(res...