Leetcode is an online platform for coding interview preparation, mainly to test one’s ability to come up with efficient algorithms to solve small theoretical problems.

I haven’t touched Leetcode in a hot minute, the minute in question being more than a year, actually. I remember being inspired by my TA in my CS2040 class, who was really helpful throughout and (you guessed it) had a really long daily streak going on Leetcode. I attempted to follow suit, but was wildly inconsistent at best. The moment I encountered a Hard, I folded and broke my streak instantly. Same went for problems that were taking a few too many hours to solve, and I also never remembered to open the site at all over the weekends.

That being said, I was still in my sophomore year then, and now I find myself in my penultimate year wanting to brush up: 1. my DSA knowledge and 2. my Java skills, which have deteriorated at a truly incredible rate. This is also basically a given in anyone’s guide to securing good dev-related internships / jobs, which would be very very very very nice to have.

I’m not gonna be as strict about the daily streak thing, but I am going to attempt to complete the entirety of the Neetcode 150 List over the coming summer. If I do accomplish that, I think I’ll be in a much better spot as an internship candidate, and also just much more confident in my teeny tiny brain’s capabilities.

I guess I’ll document some of the problems I solve here?
I’m going in order so I started off with Two Sum , hope I manage to finish this list!

Shame might also be a good motivating factor here so here’s my current leetcode profile. Ideally we add 150 to this by the end of summer.

Also, I wrote a script to help automate the transcribing of the Leetcode problem and my solution into a new note in this Obsidian vault. Check it out at: https://github.com/kienanana/obsidian-scripts

Update (20/08/26)

I have found that trying to blast through the list in order has not proven very helpful for my pattern recognition and long-term learning. Instead, I will separate the questions into their topics, and clear them topic-by-topic instead.

Full Order

1. Arrays & Hashing

  1. Contains Duplicate
  2. Valid Anagram
  3. Two Sum
  4. Group Anagrams
  5. Top K Frequent Elements
  6. Encode and Decode Strings - paywalled?
  7. Product of Array Except Self
  8. Valid Sudoku
  9. Longest Consecutive Sequence

2. Two Pointers

  1. Valid Palindrome
  2. Two Sum II - Input Array Is Sorted
  3. 3Sum
  4. Container With Most Water
  5. Trapping Rain Water

3. Sliding Window

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters
  3. Longest Repeating Character Replacement
  4. Permutation in String
  5. Minimum Window Substring
  6. Sliding Window Maximum

4. Stack

  1. Valid Parentheses
  2. Min Stack
  3. Evaluate Reverse Polish Notation
  4. Generate Parentheses
  5. Daily Temperatures
  6. Car Fleet
  7. Largest Rectangle in Histogram
  1. Binary Search
  2. Search a 2D Matrix
  3. Koko Eating Bananas
  4. Find Minimum in Rotated Sorted Array
  5. Search in Rotated Sorted Array
  6. Time Based Key-Value Store
  7. Median of Two Sorted Arrays

6. Linked List

  1. Reverse Linked List
  2. Merge Two Sorted Lists
  3. Reorder List
  4. Remove Nth Node From End of List
  5. Copy List with Random Pointer (holy shit man what is this?)
  6. Add Two Numbers
  7. Linked List Cycle
  8. Find the Duplicate Number
  9. LRU Cache
  10. Merge K Sorted Lists
  11. Reverse Nodes in K-Group

7. Trees

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree
  3. Diameter of Binary Tree
  4. Balanced Binary Tree
  5. Same Tree
  6. Subtree of Another Tree
  7. Lowest Common Ancestor of a Binary Search Tree
  8. Binary Tree Level Order Traversal
  9. Binary Tree Right Side View
  10. Count Good Nodes in Binary Tree
  11. Validate Binary Search Tree
  12. Kth Smallest Element in a BST
  13. Construct Binary Tree from Preorder and Inorder Traversal
  14. Binary Tree Maximum Path Sum
  15. Serialize and Deserialize Binary Tree

8. Tries

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure
  3. Word Search II

9. Heap / Priority Queue

  1. Kth Largest Element in a Stream
  2. Last Stone Weight
  3. K Closest Points to Origin
  4. Kth Largest Element in an Array
  5. Task Scheduler
  6. Design Twitter
  7. Find Median from Data Stream

10. Backtracking

  1. Subsets
  2. Combination Sum
  3. Permutations
  4. Subsets II
  5. Combination Sum II
  6. Word Search
  7. Palindrome Partitioning
  8. Letter Combinations of a Phone Number
  9. N-Queens

11. Graphs

  1. Number of Islands
  2. Clone Graph
  3. Max Area of Island
  4. Pacific Atlantic Water Flow
  5. Surrounded Regions
  6. Rotting Oranges
  7. Walls and Gates
  8. Course Schedule
  9. Course Schedule II
  10. Graph Valid Tree
  11. Number of Connected Components in an Undirected Graph
  12. Redundant Connection
  13. Word Ladder

12. Advanced Graphs

  1. Reconstruct Itinerary
  2. Min Cost to Connect All Points
  3. Network Delay Time
  4. Swim in Rising Water
  5. Alien Dictionary
  6. Cheapest Flights Within K Stops

13. 1-D Dynamic Programming

  1. Climbing Stairs
  2. Min Cost Climbing Stairs
  3. House Robber
  4. House Robber II
  5. Longest Palindromic Substring
  6. Palindromic Substrings
  7. Decode Ways
  8. Coin Change
  9. Maximum Product Subarray
  10. Word Break
  11. Longest Increasing Subsequence
  12. Partition Equal Subset Sum

14. 2-D Dynamic Programming

  1. Unique Paths
  2. Longest Common Subsequence
  3. Best Time to Buy and Sell Stock with Cooldown
  4. Coin Change II
  5. Target Sum
  6. Interleaving String
  7. Longest Increasing Path in a Matrix
  8. Distinct Subsequences
  9. Edit Distance
  10. Burst Balloons
  11. Regular Expression Matching

15. Greedy

  1. Maximum Subarray
  2. Jump Game
  3. Jump Game II
  4. Gas Station
  5. Hand of Straights
  6. Merge Triplets to Form Target Triplet
  7. Partition Labels
  8. Valid Parenthesis String

16. Intervals

  1. Insert Interval
  2. Merge Intervals
  3. Non-overlapping Intervals
  4. Meeting Rooms
  5. Meeting Rooms II
  6. Minimum Interval to Include Each Query

17. Math & Geometry

  1. Rotate Image
  2. Spiral Matrix
  3. Set Matrix Zeroes
  4. Happy Number
  5. Plus One
  6. Pow(x, n)
  7. Multiply Strings
  8. Detect Squares

18. Bit Manipulation

  1. Single Number
  2. Number of 1 Bits
  3. Counting Bits
  4. Reverse Bits
  5. Missing Number
  6. Sum of Two Integers
  7. Reverse Integer