LeetCode-1:两数之和
#(有人相爱,有人夜里开车看海,有人LeetCode第一题都做不出来)
##下面是两数之和的几种做法,执行时间由慢到快
###1.List集合求解
//执行时间大约240ms
public static int[] twoSum(int[] nums, int target) {
int[] indexes = new int[2];
ArrayList<Integer> list = new ArrayList<>();
for(
原创
2022-04-06 20:56:39 ·
240 阅读 ·
0 评论