代码刷题
文章平均质量分 70
smiling,living
这个作者很懒,什么都没留下…
展开
-
leetcode 刷题笔记 08-28 (双指针 plus plus)
167. Two Sum II - Input array is sortedGiven an array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number.原创 2021-08-28 23:59:56 · 116 阅读 · 1 评论 -
leetcode 刷题笔记 08-28 (双指针)
283. Move ZeroesGiven an integer arraynums, move all0's to the end of it while maintaining the relative order of the non-zero elements.Notethat you must do this in-place without making a copy of the array.原创 2021-08-28 14:59:07 · 135 阅读 · 4 评论 -
leetcode 刷题笔记 08-27 (双指针)
189. Rotate ArrayGiven an array, rotate the array to the right byksteps, wherekis non-negative.原创 2021-08-27 20:13:41 · 145 阅读 · 0 评论 -
leetcode 刷题笔记 08-26 (二分查找 plus)
35. 搜索插入位置给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。请必须使用时间复杂度为O(log n)的算法。原创 2021-08-26 22:08:20 · 118 阅读 · 1 评论