标签:else efi cti class sum image script com img
var twoSum = function(nums, target) { var obj = {} var i = 0 var res = [] while (i < nums.length) { if(obj[target - nums[i]] !== undefined) { res.push(obj[target - nums[i]]) res.push(i) } else { obj[nums[i]] = i } i++ } return res };
标签:else efi cti class sum image script com img
原文地址:https://www.cnblogs.com/ximiximi-blog/p/13230745.html