adddddd
This commit is contained in:
parent
0fbaef4b4e
commit
be40b09991
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue