Skip to content

Commit 0c16fc9

Browse files
committed
2020-09-27 21:34:35
1 parent 6fa476f commit 0c16fc9

12 files changed

+22
-22
lines changed

SUMMARY.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
+ [3. Longest Substring Without Repeating Characters](docs/leetcode/cpp/0003._Longest_Substring_Without_Repeating_Characters.md)
66
+ [004. Median of Two Sorted Arrays](docs/leetcode/cpp/0004._Median_of_Two_Sorted_Arrays.md)
77
+ [5. Longest Palindromic Substring](docs/leetcode/cpp/0005._Longest_Palindromic_Substring.md)
8-
+ [6. ZigZag Conversion](docs/leetcode/cpp/0006._ZigZag _Conversion.md)
8+
+ [6. ZigZag Conversion](docs/leetcode/cpp/0006._ZigZag_Conversion.md)
99
+ [7. Reverse Integer](docs/leetcode/cpp/0007._Reverse_Integer.md)
1010
+ [8. String to Integer (atoi)](docs/leetcode/cpp/0008._String_to_Integer_(atoi).md)
1111
+ [9. Palindrome Number](docs/leetcode/cpp/0009._Palindrome_Number.md)
@@ -19,7 +19,7 @@
1919
+ [18. 4Sum](docs/leetcode/cpp/0018._4Sum.md)
2020
+ [19. Remove Nth Node From End of List](docs/leetcode/cpp/0019._Remove_Nth_Node_From_End_of_List.md)
2121
+ [20. Valid Parentheses](docs/leetcode/cpp/0020._Valid_Parentheses.md)
22-
+ [21. Merge Two Sorted Lists](docs/leetcode/cpp/0021._Merge _Two _Sorted _Lists.md)
22+
+ [21. Merge Two Sorted Lists](docs/leetcode/cpp/0021._Merge_Two_Sorted_Lists.md)
2323
+ [22. Generate Parentheses](docs/leetcode/cpp/0022._Generate_Parentheses.md)
2424
+ [23. merge k sorted lists](docs/leetcode/cpp/0023._Merge_K_Sorted_Lists.md)
2525
+ [24. Swap Nodes in Pairs](docs/leetcode/cpp/0024._Swap_Nodes_in_Pairs.md)
@@ -48,7 +48,7 @@
4848
+ [49. Group Anagrams](docs/leetcode/cpp/0048._Rotate_Image.md)
4949
+ [49. Group Anagrams](docs/leetcode/cpp/0049._Group_Anagrams.md)
5050
+ [50. powx n](docs/leetcode/cpp/0050._powx_n.md)
51-
+ [51. N-Queens](docs/leetcode/cpp/0051._ N-Queens.md)
51+
+ [51. N-Queens](docs/leetcode/cpp/0051._N-Queens.md)
5252
+ [52. N-Queens II](docs/leetcode/cpp/0052._N-Queens_II.md)
5353
+ [053. Maximum Subarray](docs/leetcode/cpp/0053._Maximum_Subarray.md)
5454
+ [54. Spiral Matrix](docs/leetcode/cpp/0054._Spiral_Matrix.md)
@@ -101,7 +101,7 @@
101101
+ [120. Triangle](docs/leetcode/cpp/0120._Triangle.md)
102102
+ [121. Best Time to Buy and Sell Stock](docs/leetcode/cpp/0121._Best_Tim_ to_Buy_and_Sell_Stock.md)
103103
+ [122. Best Time to Buy and Sell Stock II](docs/leetcode/cpp/0122._Best_Time_to_Buy_and_Sell_Stock_II.md)
104-
+ [123. Best Time to Buy and Sell Stock III](docs/leetcode/cpp/0123._Best_Time_to_Buy _and_Sell_Stock_III.md)
104+
+ [123. Best Time to Buy and Sell Stock III](docs/leetcode/cpp/0123._Best_Time_to_Buy_and_Sell_Stock_III.md)
105105
+ [124. Binary Tree Maximum Path Sum](docs/leetcode/cpp/0124._Binary_Tree_Maximum_Path_Sum.md)
106106
+ [127. Word Ladder](docs/leetcode/cpp/0127._Word_Ladde.md)
107107
+ [128. Longest Consecutive Sequence](docs/leetcode/cpp/0128._Longest_Consecutive_Sequence.md)
@@ -114,7 +114,7 @@
114114
+ [144. Binary Tree Preorder Traversal](docs/leetcode/cpp/0144._Binary_Tree_Preorder_Traversal.md)
115115
+ [145. Binary Tree Postorder Traversal](docs/leetcode/cpp/0145._Binary_Tree_Postorder_Traversal.md)
116116
+ [147. Insertion Sort List](docs/leetcode/cpp/0147._Insert_on_Sort_List.md)
117-
+ [148.Sort list](docs/leetcode/cpp/0148._Sort _list.md)
117+
+ [148.Sort list](docs/leetcode/cpp/0148._Sort_list.md)
118118
+ [151. Reverse Words in a String](docs/leetcode/cpp/0151._Reverse_Words_in_a_String.md)
119119
+ [153. Find Minimum in Rotated Sorted Array](docs/leetcode/cpp/0153._Find_Minimum_in_Rotated_Sorted_Array.md)
120120
+ [154. Find Minimum in Rotated Sorted Array II](docs/leetcode/cpp/0154._Find_Minimum_in_Rotated_Sorted_Array-II.md)

docs/leetcode/cpp/0035._Search_Insert_Position.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
#35.search insert position
1+
# 35.search insert position
22

3-
**<font color=red>难度:Easy</font>**
3+
**<font color=red>难度:Easy</font>**
44

5-
## 刷题内容
5+
## 刷题内容
66

7-
> 原题连接
7+
> 原题连接
88
99
*https://leetcode.com/problems/search-insert-position/
1010
*
11-
> 内容描述
11+
> 内容描述
1212
1313
```
1414
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
1515
1616
You may assume no duplicates in the array.
1717
```
18-
> 思路1
19-
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
18+
> 思路1
19+
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
2020

21-
由于数组是已经排序好的,这就是一个很典型的二分法
21+
由于数组是已经排序好的,这就是一个很典型的二分法
2222

2323
```cpp
2424
class Solution {
@@ -44,11 +44,11 @@ public:
4444
}
4545
};
4646
```
47-
> 思路2
48-
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
47+
> 思路2
48+
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
4949
50-
其实这个思路也是二分法,只不过c++中已经给我们封装好了lower_bound,我们直接调用即可
51-
代码看上去也简洁很多
50+
其实这个思路也是二分法,只不过c++中已经给我们封装好了lower_bound,我们直接调用即可
51+
代码看上去也简洁很多
5252
```cpp
5353
class Solution {
5454
public:

docs/leetcode/cpp/SUMMARY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+ [3. Longest Substring Without Repeating Characters](0003._Longest_Substring_Without_Repeating_Characters.md)
55
+ [004. Median of Two Sorted Arrays](0004._Median_of_Two_Sorted_Arrays.md)
66
+ [5. Longest Palindromic Substring](0005._Longest_Palindromic_Substring.md)
7-
+ [6. ZigZag Conversion](0006._ZigZag _Conversion.md)
7+
+ [6. ZigZag Conversion](0006._ZigZag_Conversion.md)
88
+ [7. Reverse Integer](0007._Reverse_Integer.md)
99
+ [8. String to Integer (atoi)](0008._String_to_Integer_(atoi).md)
1010
+ [9. Palindrome Number](0009._Palindrome_Number.md)
@@ -32,7 +32,7 @@
3232
+ [32. Longest Valid Parentheses](0032._Longest_Valid_Parentheses.md)
3333
+ [033. Search in Rotated Sorted Array](0033._Search_in_Rotated_Sorted_Array.md)
3434
+ [34. Find First and Last Position of Element in Sorted Array](0034._Find_First_and_Last_Position_of_Element_in_Sorted_Array.md)
35-
+ [ˢ������](0035._Search_Insert_Position.md)
35+
+ [35.search insert position](0035._Search_Insert_Position.md)
3636
+ [36. Valid Sudoku](0036._Valid_Sudoku.md)
3737
+ [38. Count and Say](0038._Count_and_Say.md)
3838
+ [39. Combination Sum](0039._Combination_Sum.md)
@@ -87,7 +87,7 @@
8787
+ [104. Maximum Depth of Binary Tree](0104._Maximum_Depth_of_Binary_Tree.md)
8888
+ [105. Construct Binary Tree from Preorder and Inorder Traversal](0105._Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.md)
8989
+ [106. Construct Binary Tree from Inorder and Postorder Traversal](0106._Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.md)
90-
+ [107.Binary Tree Level Order Traversal II](0107._Binary_Tree Level_Order_Traversal_II.md)
90+
+ [107.Binary Tree Level Order Traversal II](0107._Binary_Tree_Level_Order_Traversal_II.md)
9191
+ [108. Convert Sorted Array to Binary Search Tree](0108._Convert_Sorted_Array_to_Binary_Search_Tree.md)
9292
+ [109. Convert Sorted List to Binary Search Tree](0109._Convert_Sorted_List_to_Binary_Search_Tree.md)
9393
+ [110.Balanced Binary Tree](0110._Balanced_Binary_Tree.md)
@@ -98,7 +98,7 @@
9898
+ [118. Pascal's Triangle](0118._Pascals_Triangle.md)
9999
+ [119. Pascal's Triangle II](0119._Pascals_Triangle-II.md)
100100
+ [120. Triangle](0120._Triangle.md)
101-
+ [121. Best Time to Buy and Sell Stock](0121._Best_Tim_ to_Buy_and_Sell_Stock.md)
101+
+ [121. Best Time to Buy and Sell Stock](0121._Best_Tim_to_Buy_and_Sell_Stock.md)
102102
+ [122. Best Time to Buy and Sell Stock II](0122._Best_Time_to_Buy_and_Sell_Stock_II.md)
103103
+ [123. Best Time to Buy and Sell Stock III](0123._Best_Time_to_Buy _and_Sell_Stock_III.md)
104104
+ [124. Binary Tree Maximum Path Sum](0124._Binary_Tree_Maximum_Path_Sum.md)

docs/leetcode/java/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
+ [3. Longest Substring Without Repeating Characters](0003._Longest_Substring_Without_Repeating_Characters.md)
55
+ [4. Median of Two Sorted Arrays](0004._Median_of_Two_Sorted_Arrays.md)
66
+ [5. Longest Palindromic Substring](0005._Longest_Palindromic_Substring.md)
7-
+ [6. ZigZag Conversion](0006._ ZigZag_Conversion.md)
7+
+ [6. ZigZag Conversion](0006._ZigZag_Conversion.md)
88
+ [7. Reverse Integer](0007._Reverse_Integer.md)
99
+ [23. Merge K Sorted Lists](0023._Merge_K_Sorted_Lists.md)
1010
+ [141. Linked List Cycle](0141._linked_list_cycle.md)

0 commit comments

Comments
 (0)