/algo

Primary LanguageGo

algo

Leetcode

arrays&hashing

Name Star Difficulty Practice-Count Tags
1. two-sum ⭐⭐⭐ easy 1
36. valid-sudoku medium 1
49. group-anagrams medium 2
128. longest-consecutive-sequence medium 1
217. contains-duplicate easy 1
238. product-of-array-except-self medium 1
242. valid-anagram easy 1
271. encode-and-decode-strings medium 1
347. top-k-frequent-elements medium 1

two-pointers

Name Star Difficulty Practice-Count Tags
11. container-with-most-water ⭐⭐⭐ medium 2
15. 3sum ⭐⭐⭐ medium 2
42. trapping-rain-water ⭐⭐⭐ hard 2
125. valid-palindrome easy 1 todo(write)
167. two-sum-ii-input-array-is-sorted ⭐⭐⭐ medium 1

sliding-window

Name Star Difficulty Practice-Count Tags
3. longest-substring-without-repeating-characters ⭐⭐⭐ medium 1
76. minimum-window-substring hard 1
121. best-time-to-buy-and-sell-stock easy 1 todo(write)
239. sliding-window-maximum hard 1
424. longest-repeating-character-replacement medium 1
567. permutation-in-string medium 1

stack

Name Star Difficulty Practice-Count Tags
20. valid-parentheses easy 1 todo(write)
22. generate-parentheses ⭐⭐ medium 1 todo(write)
84. largest-rectangle-in-histogram ⭐⭐ hard 1
150. evaluate-reverse-polish-notation medium 1
155. min-stack medium 1
739. daily-temperatures medium 1
853. car-fleet medium 1

binary-search

Name Star Difficulty Practice-Count Tags
4. median-of-two-sorted-arrays ⭐⭐⭐ hard 1
33. search-in-rotated-sorted-array ⭐⭐ medium 1
74. search-a-2d-matrix medium 1
153. find-minimum-in-rotated-sorted-array medium 1
704. binary-search ⭐⭐⭐ easy 2
875. koko-eating-bananas medium 1
981. time-based-key-value-store ⭐⭐ medium 1

linked-list

Name Star Difficulty Practice-Count Tags
2. add-two-numbers medium 2
19. remove-nth-node-from-end-of-list medium 2
21. merge-two-sorted-lists ⭐⭐⭐ easy 2
23. merge-k-sorted-lists ⭐⭐⭐ hard 2
25. reverse-nodes-in-k-group ⭐⭐ hard 2
138. copy-list-with-random-pointer ⭐⭐⭐ medium 2
141. linked-list-cycle ⭐⭐⭐ easy 2 todo(write)
143. reorder-list medium 1
146. lru-cache ⭐⭐⭐ medium 1
206. reverse-linked-list easy 2
287. find-the-duplicate-number ⭐⭐⭐ medium 2

trees

Name Star Difficulty Practice-Count Tags
98. validate-binary-search-tree medium 1
100. same-tree easy 2
102. binary-tree-level-order-traversal medium 1
104. maximum-depth-of-binary-tree ⭐⭐⭐ easy 2
105. construct-binary-tree-from-preorder-and-inorder-traversal ⭐⭐ medium 1
110. balanced-binary-tree ⭐⭐ easy 2
124. binary-tree-maximum-path-sum ⭐⭐⭐ hard 1
199. binary-tree-right-side-view ⭐⭐ medium 1
226. invert-binary-tree easy 2
230. kth-smallest-element-in-a-bst ⭐⭐ medium 1
235. lowest-common-ancestor-of-a-binary-search-tree ⭐⭐ medium 1 todo(write)
297. serialize-and-deserialize-binary-tree hard 1
543. diameter-of-binary-tree easy 1
572. subtree-of-another-tree ⭐⭐ easy 1
1448. count-good-nodes-in-binary-tree ⭐⭐ medium 1

tries

Name Star Difficulty Practice-Count Tags
208. implement-trie-prefix-tree medium 2
211. design-add-and-search-words-data-structure medium 1
212. word-search-ii ⭐⭐⭐ hard 1

heap(priority-queue)

Name Star Difficulty Practice-Count Tags
215. kth-largest-element-in-an-array medium 1 PR
295. find-median-from-data-stream ⭐⭐ hard 1
355. design-twitter ⭐⭐⭐ medium 1
621. task-scheduler ⭐⭐⭐ medium 1
703. kth-largest-element-in-a-stream easy 1
973. k-closest-points-to-origin ⭐⭐ medium 1
1046. last-stone-weight ⭐⭐ easy 1

backtracking

Name Star Difficulty Practice-Count Tags
17. letter-combinations-of-a-phone-number medium 1
39. combination-sum ⭐⭐⭐ medium 1
40. combination-sum-ii ⭐⭐⭐ medium 1
46. permutations ⭐⭐ medium 1
51. n-queens ⭐⭐⭐ hard 1
78. subsets ⭐⭐⭐ medium 1
79. word-search ⭐⭐ medium 1
90. subsets-ii ⭐⭐⭐ medium 1
131. palindrome-partitioning medium 1

graphs

Name Star Difficulty Practice-Count Tags
127. word-ladder ⭐⭐ hard 1
130. surrounded-regions ⭐⭐ medium 1 todo(write)
133. clone-graph medium 1
200. number-of-islands medium 1 todo(write)
207. course-schedule ⭐⭐ medium 1
210. course-schedule-ii ⭐⭐⭐ medium 1 topological-sort
261. graph-valid-tree medium 1 union-find, dfs, leet-code-premium
286. walls-and-gates medium 1 bfs, leet-code-premium
323. number-of-connected-components-in-an-undirected-graph medium 1 union-find, leet-code-premium
417. pacific-atlantic-water-flow ⭐⭐⭐ medium 1 todo(write)
684. redundant-connection medium 1 union-find
695. max-area-of-island medium 1
994. rotting-oranges ⭐⭐ medium 1

advanced-graphs

Name Star Difficulty Practice-Count Tags
269. alien-dictionary ⭐⭐⭐ hard 1 PR, YT, leet-code-premium
332. reconstruct-itinerary ⭐⭐⭐ hard 1 PR
743. network-delay-time ⭐⭐⭐ medium 1 dijkstra's-algo
778. swim-in-rising-water ⭐⭐⭐ hard 1 dijkstra's-algo
787. cheapest-flights-within-k-stops ⭐⭐⭐ medium 1 bellman-ford-algo
1584. min-cost-to-connect-all-points ⭐⭐⭐ medium 1 prim's-algo, kruskal-algo(todo), leet-code-premium, heap

1d-dp

Name Star Difficulty Practice-Count Tags
5. longest-palindromic-substring medium 1
70. climbing-stairs ⭐⭐⭐ easy 2
91. decode-ways ⭐⭐⭐ medium 1
139. word-break ⭐⭐ medium 1
152. maximum-product-subarray medium 1 todo(write)
198. house-robber medium 3
213. house-robber-ii ⭐⭐⭐ medium 3
300. longest-increasing-subsequence medium 1 todo(write)
322. coin-change ⭐⭐⭐ medium 3
416. partition-equal-subset-sum ⭐⭐ medium 1
647. palindromic-substrings medium 1
746. min-cost-climbing-stairs ⭐⭐ easy 2

2d-dp

Name Star Difficulty Practice-Count Tags
10. regular-expression-matching hard 1
62. unique-paths medium 2 math(todo)
72. edit-distance ⭐⭐⭐ medium 1 todo(write)
97. interleaving-string ⭐⭐⭐ medium 1 dfs
115. distinct-subsequences ⭐⭐⭐ hard 1 lcs
309. best-time-to-buy-and-sell-stock-with-cooldown ⭐⭐⭐ medium 1 dfs, todo-space-optimize
312. burst-balloons ⭐⭐ hard 1
329. longest-increasing-path-in-a-matrix ⭐⭐ hard 1 topological-sort
494. target-sum ⭐⭐⭐ medium 2 dfs
518. coin-change-ii ⭐⭐⭐ medium 3 dfs
1143. longest-common-subsequence ⭐⭐⭐ medium 1 todo(write)

greedy

Name Star Difficulty Practice-Count Tags
45. jump-game-ii medium 1 dp(todo)
53. maximum-subarray ⭐⭐ medium 2
55. jump-game ⭐⭐⭐ medium 2
134. gas-station ⭐⭐ medium 1
678. valid-parenthesis-string medium 1
763. partition-labels medium 1
846. hand-of-straights medium 1
1899. merge-triplets-to-form-target-triplet medium 1

intervals

Name Star Difficulty Practice-Count Tags
56. merge-intervals medium 1
57. insert-interval medium 1
253. meeting-rooms-ii medium 1
435. non-overlapping-intervals medium 1
920. meeting-rooms hard 1
1851. minimum-interval-to-include-each-query hard 1

math&geometry

Name Star Difficulty Practice-Count Tags
43. multiply-strings medium 1
48. rotate-image medium 1
50. powx-n medium 1
54. spiral-matrix medium 1
66. plus-one easy 1
73. set-matrix-zeroes medium 1
202. happy-number ⭐⭐ easy 1
213. detect-squares medium 1

bit-manipulation

Name Star Difficulty Practice-Count Tags
7. reverse-integer medium 1 PR
136. single-number easy 1
190. reverse-bits easy 1
191. number-of-1-bits easy 1
268. missing-number easy 1
338. counting-bits easy 1
371. sum-of-two-integers medium 1

todo

Name Star Difficulty Practice-Count Tags