mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-11 04:54:51 +08:00
adddddd
This commit is contained in:
@ -76,7 +76,7 @@ public:
|
||||
```
|
||||
|
||||
时间复杂度:O(n)
|
||||
时间复杂度:O(1)
|
||||
空间复杂度:O(1)
|
||||
|
||||
效率如下:
|
||||
|
||||
@ -158,7 +158,7 @@ public:
|
||||
|
||||
**大家要仔细看注释,思考为什么要写while (left < right), 为什么要写right = middle**。
|
||||
|
||||
```
|
||||
```cpp
|
||||
class Solution {
|
||||
public:
|
||||
int searchInsert(vector<int>& nums, int target) {
|
||||
|
@ -88,7 +88,8 @@
|
||||
|
||||
|
||||
以上分析完毕,C++代码如下:
|
||||
```
|
||||
|
||||
```cpp
|
||||
class Solution {
|
||||
public:
|
||||
int climbStairs(int n) {
|
||||
|
Reference in New Issue
Block a user