Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 21cf2c5

Browse files
Update 035._search_insert_position.md
1 parent fc43779 commit 21cf2c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎docs/Leetcode_Solutions/035._search_insert_position.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Output: 0
3636
## 解题方案
3737

3838
> 思路 1
39-
******- 时间复杂度: O(N^2)******- 空间复杂度: O(1)******
39+
******- 时间复杂度: O(N)******- 空间复杂度: O(1)******
4040

4141
找到第一个比```target```大的值的```index```,如果没找到则返回```len(nums)```,但是代码中直接返回```i```值就行了
4242

@@ -58,7 +58,7 @@ class Solution(object):
5858
```
5959

6060
> 思路 2
61-
******- 时间复杂度: O(NlgN)******- 空间复杂度: O(1)******
61+
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
6262

6363
```python
6464
class Solution(object):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /