Skip to content

Commit 50ef2cb

Browse files
committed
Repo Restructure
1 parent bb3ece6 commit 50ef2cb

40 files changed

+110
-104
lines changed

README.md

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,109 +2,7 @@
22

33
Algorithms written in python
44

5-
# [Sortings](https://github.com/geemaple/algorithm/tree/master/Sorting)
65

7-
# Leetcode
8-
My personal leetcode answer in python<br/>
9-
This is a **continually updated, open source** project.
6+
# [Sortings](./learning/sorting/README.md)
107

11-
12-
🎉🎉🎉 Finished 100 questions on 2018-05-28
13-
14-
# Algorithms
15-
16-
- [Leetcode](#leetcode)
17-
- [Algorithms](#algorithms)
18-
- [Array](#array)
19-
- [Two Pointers](#two-pointers)
20-
- [Linked List](#linked-list)
21-
- [Binary Search](#binary-search)
22-
- [Tree Traversal](#tree-traversal)
23-
- [Graph Traversal](#graph-traversal)
24-
- [Divide and Conquer](#divide-and-conquer)
25-
- [Backtracking](#backtracking)
26-
- [Topological Sort](#topological-sort)
27-
- [Dynamic Programming](#dynamic-programming)
28-
29-
## Array
30-
31-
| Problem | Solution | Time | Difficulty | Tag | Note|
32-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
33-
| 88.merge-sorted-array | [python](./algorithm/88.merge-sorted-array.py) | O(N + M) | Easy |
34-
| 349.intersection-of-two-arrays | [python](./algorithm/349.intersection-of-two-arrays.py) O(N + M) |Easy
35-
| 350.intersection-of-two-arrays-ii | [python](./algorithm/350.intersection-of-two-arrays-ii.py) O(N * logN) |Easy
36-
37-
## Two Pointers
38-
39-
| Problem | Solution | Time | Difficulty | Tag | Note|
40-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
41-
| 19.remove-nth-node-from-end-of-list | [python](./algorithm/19.remove-nth-node-from-end-of-list.py) | O(N) | Medium
42-
| 141.linked-list-cycle | [python](./algorithm/141.linked-list-cycle.py) | O(N) | Easy | linked-list
43-
| 142.linked-list-cycle-ii | [python](./algorithm/142.linked-list-cycle-ii.py) | O(N) | Medium | linked-list
44-
| 160.intersection-of-two-linked-lists | [python](./algorithm/160.intersection-of-two-linked-lists.py) | O(N + M) | Easy | linked-list
45-
46-
47-
## Linked List
48-
49-
| Problem | Solution | Time | Difficulty | Tag | Note|
50-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
51-
| 21.merge-two-sorted-lists | [python](./algorithm/21.merge-two-sorted-lists.py) | O(N) | Easy |
52-
| 25.reverse-nodes-in-k-group | [python](./algorithm/25.reverse-nodes-in-k-group.py) | O(N) | Hard |
53-
| 61.rotate-list | [python](./algorithm/61.rotate-list.py) | O(N) | Medium |
54-
| 86.partition-list | [python](./algorithm/86.partition-list.py) | O(N) | Medium |
55-
| 92.reverse-linked-list-ii | [python](./algorithm/92.reverse-linked-list-ii.py) | O(N) | Medium |
56-
| 138.copy-list-with-random-pointer | [python](./algorithm/138.copy-list-with-random-pointer.py) | O(N) | Medium
57-
| 143.reorder-list | [python](./algorithm/143.reorder-list.py) | O(N) | Medium |
58-
| 148.sort-list | [python](./algorithm/148.sort-list.py) | O(N * logN) | Medium |
59-
| 203.remove-linked-list-elements | [python](./algorithm/203.remove-linked-list-elements.py) | O(N) | Easy
60-
| 206.reverse-linked-list | [python](./algorithm/206.reverse-linked-list.py) | O(N) | Easy |
61-
| 237.delete-node-in-a-linked-list | [python](./algorithm/237.delete-node-in-a-linked-list.py) | O(1) | Easy
62-
63-
## Binary Search
64-
65-
| Problem | Solution | Time | Difficulty | Tag | Note|
66-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
67-
| 278.first-bad-version | [python](./algorithm/278.first-bad-version.py) | O(LogN) | Easy
68-
69-
## Divide and Conquer
70-
71-
| Problem | Solution | Time | Difficulty | Tag | Note|
72-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
73-
74-
75-
## Tree Traversal
76-
77-
| Problem | Solution | Time | Difficulty | Tag | Note|
78-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
79-
80-
81-
## Graph Traversal
82-
83-
| Problem | Solution | Time | Difficulty | Tag | Note|
84-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
85-
| 127.word-ladder | [python](./algorithm/127.word-ladder.py) | O(N * L^2) | Medium | BFS |
86-
| 200.number-of-islands | [python](./algorithm/200.number-of-islands.py) | O(ROW x COL) | Medium | BFS/DFS | union-find
87-
88-
## Backtracking
89-
| Problem | Solution | Time | Difficulty | Tag | Note|
90-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
91-
| 39.combination-sum | [python](./algorithm/39.combination-sum.py) | ??? | Medium | DFS |
92-
| 40.combination-sum-ii | [python](./algorithm/40.combination-sum-ii.py) | ??? | Medium | DFS |
93-
| 46.permutations | [python](./algorithm/46.permutations.py) | ??? | Medium | DFS |
94-
| 47.permutations-ii | [python](./algorithm/47.permutations-ii.py) | ??? | Medium | DFS |
95-
| 51.n-queens | [python](./algorithm/51.n-queens.py) | ??? | Hard | DFS |
96-
| 52.n-queens-ii | [python](./algorithm/52.n-queens-ii.py) | ??? | Hard | DFS |
97-
| 78.subsets | [python](./algorithm/78.subsets.py) | ??? | Medium | DFS | bit-manipulation
98-
| 90.subsets-ii | [python](./algorithm/90.subsets-ii.py) | ??? | Medium | DFS | bit-manipulation
99-
| 126.word-ladder-ii | [python](./algorithm/126.word-ladder-ii.py) | O((V+E) * L^2) | Hard | BFS+DFS |
100-
| 131.palindrome-partitioning | [python](./algorithm/131.palindrome-partitioning.py) | ??? | Medium | DFS | dynamic-programming
101-
102-
## Topological Sort
103-
104-
| Problem | Solution | Time | Difficulty | Tag | Note|
105-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
106-
| 444.sequence-reconstruction | [python](./algorithm/444.sequence-reconstruction.py) | O(V+E) | Medium | BFS/DFS |
107-
108-
## Dynamic Programming
109-
| Problem | Solution | Time | Difficulty | Tag | Note|
110-
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
8+
# [Leetcode](./leetcode/README.md)

learning/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Learning
2+
3+
- [Algorithms]
4+
- [Sorting](./sorting/README.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

leetcode/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Leetcode
2+
My personal leetcode answer in python<br/>
3+
This is a **continually updated, open source** project.
4+
5+
6+
🎉🎉🎉 Finished 100 questions on 2018-05-28
7+
8+
# Tags
9+
10+
- [Leetcode](#leetcode)
11+
- [Algorithms](#algorithms)
12+
- [Array](#array)
13+
- [Two Pointers](#two-pointers)
14+
- [Linked List](#linked-list)
15+
- [Binary Search](#binary-search)
16+
- [Tree Traversal](#tree-traversal)
17+
- [Graph Traversal](#graph-traversal)
18+
- [Divide and Conquer](#divide-and-conquer)
19+
- [Backtracking](#backtracking)
20+
- [Topological Sort](#topological-sort)
21+
- [Dynamic Programming](#dynamic-programming)
22+
23+
## Array
24+
25+
| Problem | Solution | Time | Difficulty | Tag | Note|
26+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
27+
| 88.merge-sorted-array | [python](./leetcode/88.merge-sorted-array.py) | O(N + M) | Easy |
28+
| 349.intersection-of-two-arrays | [python](./leetcode/349.intersection-of-two-arrays.py) O(N + M) |Easy
29+
| 350.intersection-of-two-arrays-ii | [python](./leetcode/350.intersection-of-two-arrays-ii.py) O(N * logN) |Easy
30+
31+
## Two Pointers
32+
33+
| Problem | Solution | Time | Difficulty | Tag | Note|
34+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
35+
| 19.remove-nth-node-from-end-of-list | [python](./leetcode/19.remove-nth-node-from-end-of-list.py) | O(N) | Medium
36+
| 141.linked-list-cycle | [python](./leetcode/141.linked-list-cycle.py) | O(N) | Easy | linked-list
37+
| 142.linked-list-cycle-ii | [python](./leetcode/142.linked-list-cycle-ii.py) | O(N) | Medium | linked-list
38+
| 160.intersection-of-two-linked-lists | [python](./leetcode/160.intersection-of-two-linked-lists.py) | O(N + M) | Easy | linked-list
39+
40+
41+
## Linked List
42+
43+
| Problem | Solution | Time | Difficulty | Tag | Note|
44+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
45+
| 21.merge-two-sorted-lists | [python](./leetcode/21.merge-two-sorted-lists.py) | O(N) | Easy |
46+
| 25.reverse-nodes-in-k-group | [python](./leetcode/25.reverse-nodes-in-k-group.py) | O(N) | Hard |
47+
| 61.rotate-list | [python](./leetcode/61.rotate-list.py) | O(N) | Medium |
48+
| 86.partition-list | [python](./leetcode/86.partition-list.py) | O(N) | Medium |
49+
| 92.reverse-linked-list-ii | [python](./leetcode/92.reverse-linked-list-ii.py) | O(N) | Medium |
50+
| 138.copy-list-with-random-pointer | [python](./leetcode/138.copy-list-with-random-pointer.py) | O(N) | Medium
51+
| 143.reorder-list | [python](./leetcode/143.reorder-list.py) | O(N) | Medium |
52+
| 148.sort-list | [python](./leetcode/148.sort-list.py) | O(N * logN) | Medium |
53+
| 203.remove-linked-list-elements | [python](./leetcode/203.remove-linked-list-elements.py) | O(N) | Easy
54+
| 206.reverse-linked-list | [python](./leetcode/206.reverse-linked-list.py) | O(N) | Easy |
55+
| 237.delete-node-in-a-linked-list | [python](./leetcode/237.delete-node-in-a-linked-list.py) | O(1) | Easy
56+
57+
## Binary Search
58+
59+
| Problem | Solution | Time | Difficulty | Tag | Note|
60+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
61+
| 278.first-bad-version | [python](./leetcode/278.first-bad-version.py) | O(LogN) | Easy
62+
63+
## Divide and Conquer
64+
65+
| Problem | Solution | Time | Difficulty | Tag | Note|
66+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
67+
68+
69+
## Tree Traversal
70+
71+
| Problem | Solution | Time | Difficulty | Tag | Note|
72+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
73+
74+
75+
## Graph Traversal
76+
77+
| Problem | Solution | Time | Difficulty | Tag | Note|
78+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
79+
| 127.word-ladder | [python](./leetcode/127.word-ladder.py) | O(N * L^2) | Medium | BFS |
80+
| 200.number-of-islands | [python](./leetcode/200.number-of-islands.py) | O(ROW x COL) | Medium | BFS/DFS | union-find
81+
82+
## Backtracking
83+
| Problem | Solution | Time | Difficulty | Tag | Note|
84+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
85+
| 39.combination-sum | [python](./leetcode/39.combination-sum.py) | ??? | Medium | DFS |
86+
| 40.combination-sum-ii | [python](./leetcode/40.combination-sum-ii.py) | ??? | Medium | DFS |
87+
| 46.permutations | [python](./leetcode/46.permutations.py) | ??? | Medium | DFS |
88+
| 47.permutations-ii | [python](./leetcode/47.permutations-ii.py) | ??? | Medium | DFS |
89+
| 51.n-queens | [python](./leetcode/51.n-queens.py) | ??? | Hard | DFS |
90+
| 52.n-queens-ii | [python](./leetcode/52.n-queens-ii.py) | ??? | Hard | DFS |
91+
| 78.subsets | [python](./leetcode/78.subsets.py) | ??? | Medium | DFS | bit-manipulation
92+
| 90.subsets-ii | [python](./leetcode/90.subsets-ii.py) | ??? | Medium | DFS | bit-manipulation
93+
| 126.word-ladder-ii | [python](./leetcode/126.word-ladder-ii.py) | O((V+E) * L^2) | Hard | BFS+DFS |
94+
| 131.palindrome-partitioning | [python](./leetcode/131.palindrome-partitioning.py) | ??? | Medium | DFS | dynamic-programming
95+
96+
## Topological Sort
97+
98+
| Problem | Solution | Time | Difficulty | Tag | Note|
99+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|
100+
| 444.sequence-reconstruction | [python](./leetcode/444.sequence-reconstruction.py) | O(V+E) | Medium | BFS/DFS |
101+
102+
## Dynamic Programming
103+
| Problem | Solution | Time | Difficulty | Tag | Note|
104+
| ----------------- | --------------- | --------------- | ------------- |--------------|-----|

0 commit comments

Comments
 (0)