Leetcode

1 两数之和

Leetcode题库#1 解题思路
解题思路:

遍历nums这个array

先用一个loop去遍历从index“0”到“length-1”
然后套一个loop去遍历index“1”到“length-1”
让这两个index位置上的数字相加
如果和==target,那么就return这两个loop的index

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2021-07-11
  • 2021-09-26
  • 2021-07-26
  • 2022-01-05
  • 2021-11-08
  • 2022-01-05
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2022-01-11
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案