Подборка задач на leetcode для подготовки к алгоритмическому собеседованию
Published: 2023-12-18 23:21:01

### Two Pointers (Arrays, Strings)
1) [88. Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)
2) [125. Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)
3) [680. Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/)
4) [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)
5) [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/)
6) [344. Reverse String](https://leetcode.com/problems/reverse-string/)
7) [167. Two Sum II - Input Array Is Sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
8) [15. 3Sum](https://leetcode.com/problems/3sum/)
9) [18. 4Sum](https://leetcode.com/problems/4sum/)
10) [1570. Dot Product of Two Sparse Vectors](https://leetcode.com/problems/dot-product-of-two-sparse-vectors/)
11) [443. String Compression](https://leetcode.com/problems/string-compression/)

### HashMap/HashSet

12) [1. Two Sum](https://leetcode.com/problems/two-sum/)
13) [1207. Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/)
14) [169. Majority Element](https://leetcode.com/problems/majority-element/)
15) [242. Valid Anagram](https://leetcode.com/problems/valid-anagram/)
16) [953. Verifying an Alien Dictionary](https://leetcode.com/problems/verifying-an-alien-dictionary/)
17) [771. Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/)
18) [560. Subarray Sum Equals K](https://leetcode.com/problems/subarray-sum-equals-k)
19) [49. Group Anagrams](https://leetcode.com/problems/group-anagrams/)
20) [380. Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/)

### Strings (others)
21) [67. Add Binary](https://leetcode.com/problems/add-binary/)
22) [859. Buddy Strings](https://leetcode.com/problems/buddy-strings/)
23) [205. Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/)
24) [345. Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/)
25) [5. Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)
26) [22. Generate Parentheses](https://leetcode.com/problems/generate-parentheses/)

### LinkedLists

27) [21. Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)
28) [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)
29) [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)
30) [83. Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)
31) [138. Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)
32) [19. Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)
33) [146. LRU Cache](https://leetcode.com/problems/lru-cache/)

### Binary Search
34) [69. Sqrt(x)](https://leetcode.com/problems/sqrtx/)
35) [704. Binary Search](https://leetcode.com/problems/binary-search/)
36) [278. First Bad Version](https://leetcode.com/problems/first-bad-version/)
37) [162. Find Peak Element](https://leetcode.com/problems/find-peak-element/)
38) [852. Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/)
39) [875. Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/)

### Stack
40) [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)
41) [232. Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/)
42) [1249. Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/)
43) [445. Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/)
44) [71. Simplify Path](https://leetcode.com/problems/simplify-path/)
45) [155. Min Stack](https://leetcode.com/problems/min-stack/)
46) [227. Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii)

### Queues

47) [933. Number of Recent Calls](https://leetcode.com/problems/number-of-recent-calls/)
48) [362. Design Hit Counter](https://leetcode.com/problems/design-hit-counter/)
49) [353. Design Snake Game](https://leetcode.com/problems/design-snake-game/) 

### Heap/PriorityQueue
50) [703. Kth Largest Element in a Stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/)
51) [215. Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)
52) [347. Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/)
53) [973. K Closest Points to Origin](https://leetcode.com/problems/k-closest-points-to-origin/)

### Binary Tree
54) [94. Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/) 
55) [501. Find Mode in Binary Search Tree](https://leetcode.com/problems/find-mode-in-binary-search-tree/)
56) [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)
57) [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)
58) [111. Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)
59) [938. Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/)
60) [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
61) [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)
62) [110. Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)
63) [314. Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/)
64) [1650. Lowest Common Ancestor of a Binary Tree III](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii/)
65) [1361. Validate Binary Tree Nodes](https://leetcode.com/problems/validate-binary-tree-nodes/)
66) [236. Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)
67) [515. Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/)
68) [98. Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)
69) [199. Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/)
70) [426. Convert Binary Search Tree to Sorted Doubly Linked List](https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/)
71) [102. Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)
72) [109. Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/)

### Graphs (DFS/BFS)

73) [733. Flood Fill](https://leetcode.com/problems/flood-fill/)
74) [200. Number of Islands](https://leetcode.com/problems/number-of-islands/) 
75) [463. Island Perimeter](https://leetcode.com/problems/island-perimeter/)
76) [547. Number of Provinces](https://leetcode.com/problems/number-of-provinces/)
77) [785. Is Graph Bipartite?](https://leetcode.com/problems/is-graph-bipartite/)
78) [277. Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/)
79) [695. Max Area of Island](https://leetcode.com/problems/max-area-of-island/)
80) [934. Shortest Bridge](https://leetcode.com/problems/shortest-bridge/)
81) [339. Nested List Weight Sum](https://leetcode.com/problems/nested-list-weight-sum/)

### Graphs (Topological Sort)
82) [207. Course Schedule](https://leetcode.com/problems/course-schedule/)
83) [2115. Find All Possible Recipes from Given Supplies](https://leetcode.com/problems/find-all-possible-recipes-from-given-supplies)

### Dynamic Programming

84) [509. Fibonacci Number](https://leetcode.com/problems/fibonacci-number/)
85) [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
86) [70. Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)
87) [118. Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)
88) [322. Coin Change](https://leetcode.com/problems/coin-change/)
89) [139. Word Break](https://leetcode.com/problems/word-break/)
90) [1048. Longest String Chain](https://leetcode.com/problems/longest-string-chain/)
91) [72. Edit Distance](https://leetcode.com/problems/edit-distance/)
92) [64. Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/)
93) [343. Integer Break](https://leetcode.com/problems/integer-break/)
94) [91. Decode Ways](https://leetcode.com/problems/decode-ways/)
95) [1027. Longest Arithmetic Subsequence](https://leetcode.com/problems/longest-arithmetic-subsequence/)
96) [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/)
97) [198. House Robber](https://leetcode.com/problems/house-robber/)
98) [1143. Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/)
99) [276. Paint Fence](https://leetcode.com/problems/paint-fence/)
100) [62. Unique Paths](https://leetcode.com/problems/unique-paths/)