Table of Contents

  1. Data Structures
  2. Leetcode Topic Roadmap
  3. Resources

Data Structures

🔼 Back to top

Data Structure Code Search Insert/Delete Notes Language Support
Binary Search Tree JavaScript O(logn) O(log n) C++ (map / set) & Java (TreeMap / TreeSet)
Dyanmic Array / ArrayList Unsorted: O(n) / Sorted: O(log n) Last Value: O(1) / All other values: O(n) C++ (vector), C# (ArrayList), Java (ArrayList), JavaScript (Array), & Python (list)
Hash Map / Hash Set JavaScript O(1)* O(1)* Time Complexity is constant on an amortized basis (average) C++ (unordered_map / unordered_set), C# (Dictionary / Hashtable / HashSet), Java (HashMap / HashSet), JavaScript (Map* / Set*), & Python (dictionary / set)
Linked List JavaScript O(n) O(1)
Min / Max Heap (Priority Queue) O(n) O(log n) Find-min/max: O(1) C++ (algorithm / make_heap()), Java (PriorityQueue), & Python (heapq)
Queue JavaScript O(n) O(1) FIFO / LILO (First In First Out / Last In Last Out) C++ (queue / deque), C# (Queue), Java (ArrayDeque), & Python (deque)
Stack JavaScript O(n) O(1) FILO / LIFO (First In Last Out / Last In First Out) C++ (deque / vector / stack), C# (Stack / ArrayList), Java (ArrayDeque / ArrayList / Stack), JavaScript (Array), & Python (list / deque)

Leetcode Topic Roadmap

  1. Arrays & Hashing
  2. Two Pointers
  3. Stacks
  4. Binary Search
  5. Sliding Window
  6. Linked List
  7. Trees
  8. Design
  9. Tries
  10. Backtracking
  11. Heap / Priority Queue
  12. Graphs
  13. 1-D Dynamic Programming
  14. Greedy
  15. 2-D Dynamic Programming
  16. Bit Manipulation
  17. Math & Geometry

1. Arrays & Hashing

🔼 Back to top

Problem Difficulty Code Solution Video Solution
1. Two Sum Easy C++ JavaScript Python YouTube
36. Valid Sudoku Medium Python YouTube
49. Group Anagrams Medium Python YouTube
88. Merge Sorted Array Easy Python YouTube
205. Isomorphic Strings Easy Python YouTube
217. Contains Duplicate Easy C++ JavaScript Python YouTube
228. Summary Ranges Easy Python YouTube
347. Top K Frequent Elements Medium Python YouTube
442. Find all Duplicates in an Array Medium Python YouTube
2482. Difference Between Ones and Zeros in Row and Column Medium Python YouTube

2. Two Pointers

🔼 Back to top

Problem Difficulty Code Solution Video Solution
15. 3Sum Medium Python YouTube
26. Remove Duplicates from Sorted Array Easy JavaScript Python YouTube
27. Remove Element Easy Python YouTube
28. Find the Index of the First Occurence in a String Easy Python TypeScript YouTube
125. Valid Palindrome Easy C++ JavaScript Python YouTube
167. Two Sum II - Input Array Is Sorted Medium JavaScript Python YouTube
234. Palindrome Linked List Easy Python YouTube
344. Reverse String Easy C++ JavaScript Python YouTube
1768. Merge Strings Alternately Easy Python YouTube
2130. Maximum Twin Sum of a Linked List Medium Python YouTube

3. Stacks

🔼 Back to top

Problem Difficulty Code Solution Video Solution
20. Valid Parentheses Easy C++ JavaScript Python YouTube
22. Generate Parentheses Medium Python YouTube
94. Binary Tree Inorder Traversal Easy Python YouTube
150. Evaluate Reverse Polish Notation Medium Python YouTube
1047. Remove All Adjacent Duplicates In String Easy JavaScript Python YouTube
1209. Remove All Adjacent Duplicates In String II Medium Python YouTube
1614. Maximum Nesting Depth of the Parentheses Easy Python YouTube

4. Binary Search

🔼 Back to top

Problem Difficulty Code Solution Video Solution
34. Find First and Last Position of Element in Sorted Array Medium Python YouTube
35. Search Insert Position Easy Python YouTube
69. Sqrt(x) Easy C++ JavaScript Python YouTube
374. Guess Number Higher or Lower Easy JavaScript Python YouTube
700. Search in a Binary Search Tree Easy Python YouTube
704. Binary Search Easy JavaScript YouTube

5. Sliding Window

🔼 Back to top

Problem Difficulty Code Solution Video Solution
3. Longest Substring Without Repeating Characters Medium Python YouTube
121. Best Time to Buy and Sell Stock Easy JavaScript Python YouTube
643. Maximum Average Subarray I Easy Python YouTube

6. Linked List

🔼 Back to top

Problem Difficulty Code Solution Video Solution
2. Add Two Numbers Medium Python YouTube
19. Remove Nth Node From End of List Medium Python YouTube
21. Merge Two Sorted Lists Easy JavaScript Python YouTube
83. Remove Duplicates from Sorted List Easy JavaScript Python YouTube
116. Populating Next Right Pointers in Each Node Medium Python YouTube
141. Linked List Cycle Easy JavaScript Python YouTube
206. Reverse Linked List Easy Python YouTube
237. Delete Node in a Linked List Medium C++ YouTube

7. Trees

🔼 Back to top

Problem Difficulty Code Solution Video Solution
98. Validate Binary Search Tree Medium C++ YouTube
100. Same Tree Easy C++ JavaScript Python YouTube
102. Binary Tree Level Order Traversal Medium C++ Python YouTube
103. Binary Tree Zigzag Level Order Traversal Medium Python YouTube
104. Maximum Depth of Binary Tree Easy C++ JavaScript YouTube
230. Kth Smallest Element in a BST Medium Python YouTube
863. All Nodes Distance K in Binary Tree Medium Java Python YouTube
1038. Binary Search Tree to Greater Sum Tree Medium C++ YouTube
1302. Deepest Leaves Sum Medium C++ JavaScript YouTube
2265. Count Nodes Equal to Average of Subtree Medium Python YouTube

8. Design

🔼 Back to top

Problem Difficulty Code Solution Video Solution
155. Min Stack Medium C++ Python YouTube
380. Insert Delete GetRandom O(1) Medium C++ Python YouTube
535. Encode and Decode TinyURL Medium Python YouTube
703. Kth Largest Element in a Stream Easy Python YouTube
933. Number of Recent Calls Easy Python YouTube
1603. Design Parking System Easy C++ YouTube

9. Tries

🔼 Back to top

Problem Difficulty Code Solution Video Solution
14. Longest Common Prefix Easy Python YouTube

10. Backtracking

🔼 Back to top

Problem Difficulty Code Solution Video Solution
17. Letter Combinations of a Phone Number Medium Python YouTube
46. Permutations Medium Python YouTube
78. Subsets Medium Python YouTube

11. Heap / Priority Queue

🔼 Back to top

Problem Difficulty Code Solution Video Solution
215. Kth Largest Element in an Array Medium Python YouTube
973. K Closest Points to Origin Medium Python YouTube

12. Graphs

🔼 Back to top

Problem Difficulty Code Solution Video Solution
200. Number of Islands Medium Java Python YouTube
399. Evaluate Divison Medium Python YouTube
695. Max Area of Island Medium Java Python YouTube

13. 1-D Dynamic Programming

🔼 Back to top

Problem Difficulty Code Solution Video Solution
70. Climbing Stairs Easy JavaScript YouTube
392. Is Subsequence Easy Python YouTube

14. Greedy

🔼 Back to top

Problem Difficulty Code Solution Video Solution
53. Maximum Subarray Medium C++ JavaScript Python YouTube
122. Best Time to Buy and Sell Stock II Medium JavaScript Python YouTube
134. Gas Station Medium Python YouTube
2405. Optimal Partition of String Medium C++ Python YouTube
2571. Minimum Operations to Reduce an Integer to 0 Medium Python YouTube

15. 2-D Dynamic Programming

🔼 Back to top

Problem Difficulty Code Solution Video Solution
62. Unique Paths Medium Python YouTube
64. Minimum Path Sum Medium Python YouTube

16. Bit Manipulation

🔼 Back to top

Problem Difficulty Code Solution Video Solution
7. Reverse Integer Medium Python YouTube
67. Add Binary Easy Python YouTube
136. Single Number Easy C# JavaScript Python YouTube
190. Reverse Bits Easy Python YouTube
191. Number of 1 Bits Easy Python YouTube
268. Missing Number Easy Python YouTube
2433. Find The Original Array of Prefix Xor Medium Python YouTube

17. Math & Geometry

🔼 Back to top

Problem Difficulty Code Solution Video Solution
9. Palindrome Number Easy C++ YouTube
13. Roman to Integer Easy C++ Java JavaScript YouTube
48. Rotate Image Medium Python YouTube
66. Plus One Easy Python YouTube
73. Set Matrix Zeroes Medium Python YouTube
202. Happy Number Easy JavaScript Python YouTube
258. Add Digits Easy JavaScript Python YouTube
412. Fizz Buzz Easy C++ Java JavaScript Python YouTube
509. Fibonacci Number Easy C++ JavaScript YouTube
1492. The kth Factor of n Medium Python YouTube

Resources

🔼 Back to top

Website Description
Pramp Free Interview Practice
GitHub Skill Assessment Quizzes
UNLV Resume and Interview Tips
Levels.fyi Compensation Information