ICode9

精准搜索请尝试: 精确搜索
  • ALGO-双指针2022-08-01 01:02:45

    167. Two Sum II - Input Array Is Sorted func twoSum(numbers []int, target int) []int { tmpMap := make(map[int]int, 10) for idx, val := range numbers { v, ok := tmpMap[target-val] if ok { return []int{v + 1, idx + 1} } tmpMap[val] = idx } r

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有