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 2d520ad

Browse files
committed
.
1 parent 913871a commit 2d520ad

File tree

1 file changed

+51
-31
lines changed

1 file changed

+51
-31
lines changed

‎README.md

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,54 +33,74 @@
3333
* [Linked List](https://github.com/yuzhoujr/LeetCode#linked-list)
3434

3535

36-
## Linked List
37-
[Overview](http://www.cnblogs.com/Raising-Sun/p/5970662.html#3534606)
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+
49+
3850

3951
## Array Medium
4052
| # | Title | Solution | Time | Space | Video|
4153
| --- | ----- | -------- | ---- | ----- | ---- |
4254
|3| [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/#/solutions) | [Python](./array/3.py) | _O(n)_| _O(n)_ ||
4355
|463| [Island Perimeter](https://leetcode.com/problems/island-perimeter/#/description) | [Python](./array/463.py) | _O(n^2)_| _O(1)_||
4456

57+
58+
59+
60+
61+
## Linked List
62+
[Overview](http://www.cnblogs.com/Raising-Sun/p/5970662.html#3534606)
63+
4564
## Linked List Easy
4665
| # | Title | Solution | Time | Space | Video|
4766
| --- | ----- | -------- | ---- | ----- | ---- |
48-
|21|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists) | [Python](./linkedlist/MergeTwoSortedLists.py) | _O(n)_| _O(n)_ ||
49-
| 89 |[Partition List](https://leetcode.com/problems/partition-list/) | [Python](./linkedlist/PartitionLinkedList.py) | _O(n)_ | _O(n)_ ||
50-
|141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/#/description) | [Python](./linkedlist/LinkedListCycle.py) | _O(n)_ | _O(1)_ ||
67+
|21|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists) | [Python](./linkedlist/MergeTwoSortedLists.py) | _O(n)_| _O(n)_ ||
68+
|89|[Partition List](https://leetcode.com/problems/partition-list/) | [Python](./linkedlist/PartitionLinkedList.py) | _O(n)_ | _O(n)_ ||
69+
|141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/#/description) | [Python](./linkedlist/LinkedListCycle.py) | _O(n)_ | _O(1)_ ||
5170
|160|[Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists) | [Python](./linkedlist/IntersectionOfTwoLinkedLists.py) | _O(n)_| _O(1)_ ||
5271
|203|[Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/#/description) | [Python](./linkedlist/RemoveLinkedListElements.py) | _O(n)_| _O(1)_ ||
5372
|206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/#/description) | [Python](./linkedlist/ReverseLinkedList.py) | _O(n)_| _O(1)_ || Tutorial](https://www.youtube.com/watch?v=sYcOK51hl-A&t=681s) |
5473
|234|[Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) | [Python](./linkedlist/palindrome.py) | _O(n)_| _O(1)_ ||
5574
|83|[Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/#/description)| [Python](./linkedlist/deleteDuplicates.py) | _O(n)_| _O(1)_ ||
5675

76+
5777
## LinkedList Medium
58-
| # | Title | Solution | Time | Space | Difficulty |Tag| Note|
59-
|-----|-------| -------- | ---- | ------|------------|---|-----|
60-
|2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/#/description) | [Python](./linkedlist/addTwoNumbers.py) | _O(n)_| _O(n)_| Medium |CC189||
61-
|445| [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/#/description)| [Python](./linkedlist/addTwoNumbersTwo.py) | _O(n)_| _O(n)_| Medium |CC189 |Stack|
62-
|142|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/#/description)| [Python](./linkedlist/detectCycleii.py) | _O(n)_| _O(1)_| Medium |CC189 |[Video](https://www.youtube.com/watch?v=iZVBVCpmugI&t=1s)|
63-
|328|[Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/#/description)| [Python](./linkedlist/oddEvenList.py) | _O(n)_| _O(1)_| Medium |||
64-
|143|[Reorder List](https://leetcode.com/problems/reorder-list/#/description)| [Python](./linkedlist/reorder.py) | _O(n)_| _O(1)_| Medium |||
65-
|24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/#/solutions)| [Python](./linkedlist/swapPairs.py) | _O(n)_| _O(1)_| Medium ||[Note](http://imgur.com/a/4G6ng)|
66-
|148|[Sort List](https://leetcode.com/problems/sort-list/#/description)| [Python](./linkedlist/sortList.py) | _O(nlogn)_| _O(1)_| Medium |||
67-
|61|[Rotate List](https://leetcode.com/problems/rotate-list/#/description)| [Python](./linkedlist/rotateRight.py) | _O(n)_| _O(1)_| Medium |||
68-
|19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/#/description)| [Python](./linkedlist/removeNthFromEnd.py) | _O(n)_| _O(1)_| Medium |||
69-
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/#/description)| [Python](./linkedlist/copyRandomList.py) | _O(n)_| _O(n)_| Medium |||
78+
| # | Title | Solution | Time | Space | Video|
79+
|---|-----| -------- | ---- | -----|----|
80+
|2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/#/description) | [Python](./linkedlist/addTwoNumbers.py) | _O(n)_| _O(n)_|
81+
|445| [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/#/description)| [Python](./linkedlist/addTwoNumbersTwo.py) | _O(n)_| _O(n)_|
82+
|142|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/#/description)| [Python](./linkedlist/detectCycleii.py) | _O(n)_| _O(1)_|[:tv:](https://www.youtube.com/watch?v=iZVBVCpmugI&t=1s)|
83+
|328|[Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/#/description)| [Python](./linkedlist/oddEvenList.py) | _O(n)_| _O(1)_|
84+
|143|[Reorder List](https://leetcode.com/problems/reorder-list/#/description)| [Python](./linkedlist/reorder.py) | _O(n)_| _O(1)_|
85+
|24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/#/solutions)| [Python](./linkedlist/swapPairs.py) | _O(n)_| _O(1)_|
86+
|148|[Sort List](https://leetcode.com/problems/sort-list/#/description)| [Python](./linkedlist/sortList.py) | _O(nlogn)_| _O(1)_|
87+
|61|[Rotate List](https://leetcode.com/problems/rotate-list/#/description)| [Python](./linkedlist/rotateRight.py) | _O(n)_| _O(1)_|
88+
|19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/#/description)| [Python](./linkedlist/removeNthFromEnd.py) | _O(n)_| _O(1)_|
89+
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/#/description)| [Python](./linkedlist/copyRandomList.py) | _O(n)_| _O(n)_|
7090

7191

7292
## Stacks Easy
73-
| # | Title | Solution | Time | Space | Difficulty |Tag| Note|
74-
|-----|-------| -------- | ---- | ------|------------|---|-----|
93+
| # | Title | Solution | Time | Space | Video|
94+
|---|-----| -------- | ---- | -----|----|
7595
|155|[Min Stack](https://leetcode.com/problems/min-stack/#/description)| [Python](./stack_queue/minStack.py) | _O(1)_| _O(n)_ | Easy | ||
7696
|225|[Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/#/description)| [Python](./stack_queue/queueStack.py) | push/pop: _O(1)_ top:_O(n)_ | _O(n)_ | Easy | ||
7797
|20|[Valid Parentheses](https://leetcode.com/problems/valid-parentheses/#/description)| [Python](./stack_queue/isValid.py) | _O(n)_| _O(n)_ | Easy | ||
7898
|346|[Moving Average from Data Stream](https://leetcode.com/problems/moving-average-from-data-stream/#/description)| [Python](./stack_queue/movingAverage.py) | _O(1)_| _O(n)_ | Easy | ||
7999

80100

81101
## Tree Easy
82-
| # | Title | Solution | Time | Space | Difficulty |Tag| Note|
83-
|-----|-------| -------- | ---- | ------|------------|---|-----|
102+
| # | Title | Solution | Time | Space | Video|
103+
|---|-----| -------- | ---- | -----|----|
84104
|110|[Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/#/description)| [Python [Yu]](./tree/Yu/110_isBalanced.py) | _O(N)_| _O(h)_ | Easy | ||
85105
|112|[Path Sum](https://leetcode.com/problems/path-sum/#/description)| [Python [Yu]](./tree/Yu/112_hasPathSum.py) | _O(N)_| _O(h)_ | Easy | |[中文讲解](https://www.youtube.com/watch?v=LgtcGjIuE18&feature=youtu.be)|
86106
|100|[Same Tree](https://leetcode.com/problems/same-tree/)| [Python [Yu]](./tree/Yu/100_isSameTree.py) | _O(N)_| _O(1)_ | Easy |||
@@ -102,8 +122,8 @@
102122

103123

104124
## Tree Medium
105-
| # | Title | Solution | Time | Space | Difficulty |Tag| Note|
106-
|-----|-------| -------- | ---- | ------|------------|---|-----|
125+
| # | Title | Solution | Time | Space | Video|
126+
|---|-----| -------- | ---- | -----|----|
107127
|144|[Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/#/description)| [Python [Yu]](./tree/Yu/144.py) | _O(N)_| _O(N)_ | Medium | |[:tv:](https://youtu.be/cHbdPonjYS0)|
108128
|102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/#/description)| [Python [Yu]](./tree/Yu/102.py) | _O(N)_| _O(N)_ | Medium | |[:tv:](https://youtu.be/IWiprpdSgzg)|
109129
|107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/#/description)| [Python [Yu]](./tree/Yu/107.py) | _O(N)_| _O(N)_ | Medium | ||
@@ -116,8 +136,8 @@
116136

117137

118138
## Backtrack Medium
119-
| # | Title | Solution | Time | Space | Difficulty |Tag| Note|
120-
|-----|-------| -------- | ---- | ------|------------|---|-----|
139+
| # | Title | Solution | Time | Space | Video|
140+
|---|-----| -------- | ---- | -----|----|
121141
|78|[Subsets](https://leetcode.com/problems/subsets/#/description)| [Python [Yu]](./backtrack/Yu/78.py) | _O(N*(2^N))_| _O(2^N)_ | Medium | |[:tv:](https://youtu.be/Az3PfUep7gk)|
122142
|90|[Subsets II](https://leetcode.com/problems/subsets-ii/#/description)| [Python [Yu]](./backtrack/Yu/90.py) | _O(N*(2^N))_| _O(2^N)_ | Medium | |[:tv:](https://youtu.be/Az3PfUep7gk)|
123143
|46|[Permutations](https://leetcode.com/problems/permutations/#/description)| [Python [Yu]](./backtrack/Yu/46.py) | _O(N*(N!))_| _O(N!)_ | Medium | |[:tv:](https://www.youtube.com/watch?v=oCGMwvKUQ_I&feature=youtu.be)|
@@ -129,22 +149,22 @@
129149
|216|[Combination Sum III](https://leetcode.com/problems/combination-sum-iii/#/description)| [Python [Yu]](./backtrack/Yu/216.py) | _O(K * (2^N)_| _O(N)_ | Medium | ||
130150

131151
## Greedy Medium
132-
| # | Title | Solution | Time | Space | Difficulty | Note|
133-
|-----|-------| -------- | ---- | ------|------------|-----|
152+
| # | Title | Solution | Time | Space | Video|
153+
|---|-----| -------- | ---- | -----|----|
134154
|452|[Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/#/description)| [Python [Yu]](./greedy/452.py) | _O(N)_| _O(1)_ | Medium| |
135155

136156
## Dynamic Programming Easy
137-
| # | Title | Solution | Time | Space | Difficulty | Note|
138-
|-----|-------| -------- | ---- | ------|------------|-----|
157+
| # | Title | Solution | Time | Space | Video|
158+
|---|-----| -------- | ---- | -----|----|
139159
|70|[Climbing Stairs](https://leetcode.com/problems/climbing-stairs/#/solutions)| [Python [Yu]](./dp/70.py) | _O(N)_| _O(1)_ | Easy| |
140160
|53|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray/#/description)| [Python [Yu]](./dp/53.py) | _O(N)_| _O(N)_ | Easy|[:tv:](https://youtu.be/4tfhDdgu76E) |
141161
|198|[House Robber](https://leetcode.com/problems/house-robber/#/description)| [Python [Yu]](./dp/198.py) | _O(N)_| _O(N)_ | Easy|[:tv:](https://youtu.be/QSjPkgyxCaQ) |
142162

143163

144164

145165
## Dynamic Programming Medium
146-
| # | Title | Solution | Time | Space | Difficulty | Note|
147-
|-----|-------| -------- | ---- | ------|------------|-----|
166+
| # | Title | Solution | Time | Space | Video|
167+
|---|-----| -------- | ---- | -----|----|
148168
|64|[Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/#/submissions/1)| [Python [Yu]](./dp/64.py) | _O(N^2)_| _O(M*N)_ | Medium| [:tv:](https://youtu.be/bEcW6QqgXvM)|
149169
|62|[Unique Paths](https://leetcode.com/problems/unique-paths/#/description)| [Python [Yu]](./dp/62.py) | _O(N^2)_| _O(M*N)_ | Medium| Reference #64|
150170
|55|[Jump Game](https://leetcode.com/problems/jump-game/)| [Python [Yu]](./dp/55.py) | _O(N^2)_| _O(1)_ | Medium| TLE with DP/Use Greedy for O(N) Solution|

0 commit comments

Comments
(0)

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