摘要:
双指针主要用于遍历数组,两个指针指向不同的元素,从而协同完成任务。 1. 有序数组的 Two Sum 167. Two Sum II - Input array is sorted (Easy) Leetcode / 力扣 Input: numbers={2, 7, 11, 15}, target= 阅读全文
摘要:
1. 把数组中的 0 移到末尾 283. Move Zeroes (Easy) Leetcode / 力扣 For example, given nums = [0, 1, 0, 3, 12], after calling your function, nums should be [1, 3, 1 阅读全文