-
Notifications
You must be signed in to change notification settings - Fork 5
update: 添加问题“153.寻找旋转排序数组中的最小值”的代码和题解 + update: 添加问题“154. 寻找旋转排序数组中的最小值 II”的代码和题解 + refactor: launch.json + newSolution.py: Linux support #1592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
26022d7
test: try 15.5M libstdc++.so.6
LetMeFly666 63fe9ed
feat: stop code-server docker downloading 15.5M before dbging cpp fir…
LetMeFly666 b26f9bf
feat: launch.json+tasks.json合并(平台condition) (#1589)
LetMeFly666 2604e3b
153: half.cpp (#1588)
LetMeFly666 8743290
153: half.cpp (#1588) 天呐
LetMeFly666 aebe61c
704: AC.cpp (#1588) - 二分左闭右开
LetMeFly666 e116d7a
153: WA.cpp (#1588) - 二分左闭右开
LetMeFly666 20ed31b
153: AC.cpp (#1588) - 二分左闭右开
LetMeFly666 6949519
update: 添加问题“153.寻找旋转排序数组中的最小值”的代码和题解 (#1591)
LetMeFly666 c5cf64b
fix: newSolution.py's rerun at next day (#1591)
LetMeFly666 7d60b8c
feat: newSolution.py Linux's name support (#1591)
LetMeFly666 4ec8481
feat: newSolution.py python3.12's \\ in """ (#1591)
LetMeFly666 603bfdc
154: WA.cpp (#1590) - output: -1094795586 - 0/193 accpeted
LetMeFly666 3f84dab
154: WA.cpp (#1590) - output: -1094795586 - 1/193 accpeted
LetMeFly666 6051308
154: AC.cpp (#1590) - AC,100.00%,17.74%
LetMeFly666 1cc23c6
update: 添加问题“154.寻找旋转排序数组中的最小值II”的代码和题解 (#1592)
LetMeFly666 ac3aef1
docs: VSCode Docker(Code Server)首次调试C++长时间下载debuginfo问题 (#1589)
LetMeFly666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * @Author: LetMeFly | ||
| * @Date: 2026-05-15 21:04:02 | ||
| * @LastEditors: LetMeFly.xyz | ||
| * @LastEditTime: 2026-05-15 22:01:34 | ||
| */ | ||
| #ifdef _DEBUG | ||
| #include "_[1,2]toVector.h" | ||
| #endif | ||
|
|
||
| class Solution { | ||
| public: | ||
| int findMin(vector<int>& nums) { | ||
| int l = 0, r = nums.size(); // 左闭右开 | ||
| while (l < r) { | ||
| int m = (l + r) >> 1; | ||
| if (nums[m] > nums.back()) { | ||
| l = m + 1; | ||
| } else { | ||
| r = m; | ||
| } | ||
| } | ||
| return nums[l]; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * @Author: LetMeFly | ||
| * @Date: 2026-05-16 20:33:53 | ||
| * @LastEditors: LetMeFly.xyz | ||
| * @LastEditTime: 2026-05-16 20:44:41 | ||
| */ | ||
| #ifdef _DEBUG | ||
| #include "_[1,2]toVector.h" | ||
| #endif | ||
|
|
||
| class Solution { | ||
| public: | ||
| int findMin(vector<int>& nums) { | ||
| int l = 0, r = nums.size() - 1; // 左右闭区间吧还是 | ||
| while (l < r) { | ||
| int m = (l + r) >> 1; | ||
| if (nums[m] == nums[r]) { | ||
| r--; | ||
| } else if (nums[m] > nums[r]) { | ||
| l = m + 1; | ||
| } else { | ||
| r = m; | ||
| } | ||
| } | ||
| return nums[l]; | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * @Author: LetMeFly | ||
| * @Date: 2026-05-15 21:30:07 | ||
| * @LastEditors: LetMeFly.xyz | ||
| * @LastEditTime: 2026-05-15 21:31:25 | ||
| */ | ||
| #ifdef _DEBUG | ||
| #include "_[1,2]toVector.h" | ||
| #endif | ||
| class Solution { | ||
| public: | ||
| int search(vector<int>& nums, int target) { | ||
| int l = 0, r = nums.size(); | ||
| while (l < r) { | ||
| int m = (l + r) >> 1; | ||
| if (nums[m] < target) { | ||
| l = m + 1; | ||
| } else if (nums[m] == target) { | ||
| return m; | ||
| } else { | ||
| r = m; | ||
| } | ||
| } | ||
| return -1; | ||
| } | ||
| }; | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.