![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode学习
luketay1234
这个作者很懒,什么都没留下…
展开
-
leetcode设计类
leetcode设计类原创 2022-05-31 22:35:13 · 100 阅读 · 0 评论 -
leetcode二分查找学习
⼆分查找场景:寻找⼀个数、寻找左侧边界、寻 找右侧边界。 int binarySearch(int[] nums, int target) { int left = 0, right = ...; while(...) { int mid = (right + left) / 2; if (nums[mid] == target) { ... } else if (nums[mid] < target) {原创 2022-05-30 15:35:48 · 71 阅读 · 0 评论 -
leetcode日常学习
1,滑动窗口 int minSubArrayLen(int target, int* nums, int numsSize){ if (numsSize == 0) { return 0; } int sum = 0; int ans = INT_MAX; int left = 0; int right = 0; while (right < numsSize) { //窗口右边界 sum += nums[ri............原创 2022-05-29 00:07:31 · 166 阅读 · 1 评论