When studying algorithms and data structures, besides course material, I recommend solving the relevant leetcode questions. Start with the easy ones but note that if this is your first attempt at solving "easy" questions, they won't be easy at all, watch this video for a general approach. Don't just focus on the answer, analyze your solution process even after your solution passes all tests so that it really sinks in.
The good news is that once you solve easy questions, medium ones are not that difficult. The website NeetCode organizes problems nicely according to data structure type and difficulty, I personally use the NeetCode 150 group (see my notes). Python is a concise language to solve coding problems, this 26 minute video teaches you enough python for that. After you finish 29 easy questions on NeetCode 150, move to medium questions, and finally solve the hard ones. It will probably take a couple of months to solve all 150 questions. Besides strengthening you algorithms and data structures foundation, you also will have practiced for coding interviews.
If you want to practice more in a specific area, you can use chatGPT to generate additional questions/problems, e.g. "generate a medium level coding question related to trie data structure"
Visualizing algorithms: Visualgo
05.10.2025: For junior roles, consider this smaller set of 49 questions curated by Aman Manazir, designed to be completed in 8 weeks:
ARRAYS & HASHING
01 | Easy | Contains Duplicate |
02 | Easy | Valid Anagram |
03 | Easy | Two Sum |
04 | Medium | Group Anagrams |
05 | Medium | Top K Frequent Elements |
06 | Medium | Valid Sudoku |
07 | Medium | Product of Array Except Self |
08 | Medium | Longest Consecutive Sequence |
TWO POINTERS
09 | Easy | Valid Palindrome |
10 | Medium | Two Sum II Input Array Is Sorted |
11 | Medium | 3Sum |
12 | Medium | Container With Most Water |
SLIDING WINDOW
13 | Easy | Best Time to Buy And Sell Stock |
14 | Medium | Longest Substring Without Repeating Characters |
15 | Medium | Longest Repeating Character Replacement |
STACK
16 | Easy | Valid Parentheses |
17 | Medium | Min Stack |
18 | Medium | Daily Temperatures |
BINARY SEARCH
19 | Easy | Binary Search |
20 | Medium | Find Minimum In Rotated Sorted Array |
21 | Medium | Search In Rotated Sorted Array |
LINKED LIST
22 | Easy | Reverse Linked List |
23 | Easy | Merge Two Sorted Lists |
24 | Medium | Reorder List |
25 | Medium | Remove Nth Node From End of List |
26 | Easy | Linked List Cycle |
27 | Medium | LRU Cache |
TREES
28 | Easy | Invert Binary Tree |
29 | Easy | Maximum Depth of Binary Tree |
30 | Easy | Diameter of Binary Tree |
31 | Easy | Balanced Binary Tree |
32 | Easy | Same Tree |
33 | Easy | Subtree of Another Tree |
34 | Medium | Lowest Common Ancestor of a Binary Search Tree |
35 | Medium | Binary Tree Level Order Traversal |
36 | Medium | Binary Tree Right Side View |
37 | Medium | Count Good Nodes In Binary Tree |
38 | Medium | Validate Binary Search Tree |
39 | Medium | Kth Smallest Element In a Bst |
HEAP / PRIORITY QUEUE
40 | Easy | Kth Largest Element In a Stream |
41 | Easy | Last Stone Weight |
42 | Medium | Kth Largest Element In An Array |
GRAPHS
43 | Medium | Number of Islands |
44 | Medium | Max Area of Island |
45 | Medium | Clone Graph |
46 | Medium | Pacific Atlantic Water Flow |
47 | Medium | Surrounded Regions |
48 | Medium | Course Schedule |
49 | Medium | Course Schedule II |
No comments:
Post a Comment