LeetCode Questions List

This page contains a comprehensive list of all LeetCode problems solved in this blog, organized by difficulty level, category, and solution approach.

Summary Statistics

  • Total Problems: 177
  • Easy: 29 problems
  • Medium: 130 problems
  • Hard: 20 problems

All LeetCode Problems

Problem Title Difficulty Category Solution Approach Date Added
2 Add Two Numbers Medium Linked List, Math Recursion, Carry Propagation 2025-11-18
3 Longest Substring Without Repeating Characters Medium String, Sliding Window Hash Map, Two Pointers 2025-10-09
18 4Sum Medium Array, Two Pointers Two Pointers, Sorting 2025-11-04
20 Valid Parentheses Easy String, Stack Stack, Hash Map 2025-11-04
23 Swap Nodes in Pairs Medium Linked List Recursion, Iteration 2025-09-24
25 Reverse Nodes in k-Group Hard Linked List Recursion, Iteration 2025-09-24
27 Remove Element Easy Array, Two Pointers Two Pointers, In-Place 2026-01-26
32 Longest Valid Parentheses Hard String, Dynamic Programming DP, Two-Pass Greedy 2025-11-24
33 Search in Rotated Sorted Array Medium Array, Binary Search Binary Search 2025-09-23
325 Maximum Size Subarray Sum Equals k Medium Array, Hash Table, Prefix Sum Prefix Sum, Hash Map 2026-02-01
45 Jump Game II Medium Array, Greedy Greedy BFS, Level Traversal 2025-11-18
46 Permutations Medium Backtracking, Recursion Backtracking, STL 2025-10-21
47 Permutations II Medium Backtracking, Recursion, Duplicates Backtracking, STL 2025-10-21
48 Rotate Image Medium Array, Matrix Matrix Rotation 2025-09-24
49 Group Anagrams Medium String, Hash Table Character Counting, Hash Map 2025-11-18
50 Pow(x, n) Medium Math, Recursion Fast Exponentiation 2025-09-25
54 Spiral Matrix Medium Array, Matrix Simulation 2025-09-25
56 Merge Intervals Medium Array, Sorting, Intervals Sort and Merge 2025-11-24
62 Unique Paths Medium Math, Dynamic Programming DP, Combinatorics 2025-09-24
63 Unique Paths II Medium Array, Dynamic Programming DP, Space Optimization 2026-01-21
67 Add Binary Easy String, Math, Bit Manipulation Two Pointers, Carry Propagation 2025-12-11
75 Sort Colors Medium Array, Two Pointers, Sorting Dutch National Flag, Two Pointers 2025-12-02
346 Moving Average from Data Stream Easy Queue, Sliding Window, Design Queue, Running Sum 2025-12-14
77 Combinations Medium Backtracking, Recursion Backtracking, DFS 2025-10-20
84 Largest Rectangle in Histogram Hard Stack, Monotonic Stack Monotonic Stack 2025-10-21
89 Gray Code Medium Math, Bit Manipulation Bit Manipulation 2025-09-25
96 Unique Binary Search Trees Medium Math, Dynamic Programming DP, Catalan Numbers 2025-10-03
129 Sum Root to Leaf Numbers Medium Tree, DFS DFS, Path Accumulation 2025-11-24
131 Palindrome Partitioning Medium Backtracking Backtracking, DFS 2025-09-30
133 Clone Graph Medium Graph, DFS, BFS DFS, BFS, Deep Copy 2025-10-20
146 LRU Cache Medium Design, Data Structures Hash Map, Doubly Linked List 2025-12-02
150 Evaluate Reverse Polish Notation Medium Stack Stack 2025-09-24
198 House Robber Medium Dynamic Programming DP, Pick or Skip 2025-11-18
213 House Robber II Medium Array, Dynamic Programming DP, Circular Array 2026-01-25
200 Number of Islands Medium DFS, Graph, Matrix DFS, Connected Components 2025-11-20
203 Remove Linked List Elements Easy Linked List Two Pointers, Dummy Node 2025-11-18
209 Minimum Size Subarray Sum Medium Array, Sliding Window, Binary Search Sliding Window, Prefix Sum 2026-01-26
213 House Robber II Medium Array, Dynamic Programming DP, Circular Array 2026-01-25
238 Product of Array Except Self Medium Array, Prefix Sum Left/Right Products 2026-01-27
560 Subarray Sum Equals K Medium Array, Hash Table, Prefix Sum Prefix Sum, Hash Map 2026-02-01
327 Count of Range Sum Hard Array, Divide and Conquer Merge Sort, Segment Tree, Prefix Sum 2026-01-20
862 Shortest Subarray with Sum at Least K Hard Array, Sliding Window, Deque Monotonic Deque, Prefix Sum 2026-01-26
207 Course Schedule Medium Graph, Topological Sort Topological Sort, Cycle Detection 2025-10-21
208 Implement Trie (Prefix Tree) Medium String, Design, Trie Trie, Prefix Tree, Data Structure 2026-01-18
2080 Range Frequency Queries Medium Array, Hash Map, Binary Search, Design Hash Map, Binary Search 2026-01-28
211 Design Add and Search Words Data Structure Medium String, Design, Trie Trie, Wildcard Search, DFS 2026-01-19
2185 Counting Words With a Given Prefix Easy String, Array Prefix Matching, Simulation 2026-01-19
218 The Skyline Problem Hard Array, Sweep Line Sweep Line, Priority Queue 2025-10-05
224 Basic Calculator Medium String, Stack, Math Stack, Expression Evaluation 2025-11-13
227 Basic Calculator II Medium String, Stack, Math Stack, Expression Evaluation 2025-11-13
239 Sliding Window Maximum Hard Array, Sliding Window, Deque Monotonic Deque 2025-11-04
240 Search a 2D Matrix II Medium Array, Binary Search Binary Search, Divide & Conquer 2025-10-07
253 Meeting Rooms II Medium Array, Sorting, Priority Queue Priority Queue, Two Pointers, Bucket Sort 2025-12-11
277 Find the Celebrity Medium Graph, Two Pointers Two-Pass, Candidate Elimination 2025-11-24
281 Zigzag Iterator Medium Design, Iterator Two Pointers, Queue 2025-12-10
279 Perfect Squares Medium Math, Dynamic Programming, BFS Legendre’s Theorem, DP, BFS 2025-12-14
286 Walls and Gates Medium Array, Matrix, BFS Multi-source BFS 2025-12-14
300 Longest Increasing Subsequence Medium Array, Dynamic Programming DP, Binary Search 2025-10-17
354 Russian Doll Envelopes Medium Array, Dynamic Programming, Binary Search LIS, Binary Search, Sorting 2026-01-25
314 Binary Tree Vertical Order Traversal Medium Tree, BFS BFS, Vertical Order 2025-10-21
316 Remove Duplicate Letters Medium String, Stack Monotonic Stack, Greedy 2025-10-17
317 Shortest Distance from All Buildings Hard BFS, Matrix BFS, Multi-source 2025-09-24
322 Coin Change Medium Dynamic Programming, DP DP, Unbounded Knapsack 2025-10-21
324 Wiggle Sort II Medium Array, Sorting Sorting, 3-way Partition 2025-11-04
344 Reverse String Easy String, Two Pointers Two Pointers 2025-10-29
347 Top K Frequent Elements Medium Array, Hash Table, Heap Bucket Sort, Quickselect, Heap 2025-10-21
348 Design Tic-Tac-Toe Medium Design, Array Counter Optimization, State Tracking 2025-10-21
349 Intersection of Two Arrays Easy Array, Hash Table Hash Set, Duplicate Removal 2026-01-19
394 Decode String Medium String, Stack Stack, String Processing 2025-10-19
398 Random Pick Index Medium Hash Table, Reservoir Sampling Hash Map, Preprocessing 2025-11-24
399 Evaluate Division Medium Disjoint Set, Graph, DFS Weighted Union-Find, Graph DFS 2025-12-17
406 Queue Reconstruction by Height Medium Array, Greedy Greedy, Sorting 2025-10-19
408 Valid Word Abbreviation Easy String, Two Pointers Position Tracking, Parsing 2025-11-24
409 Longest Palindrome Easy String, Hash Table, Greedy Bit Manipulation, Frequency Counting 2026-01-19
417 Pacific Atlantic Water Flow Medium Array, DFS DFS, BFS 2025-10-19
419 Battleships in a Board Medium Array, Matrix Top-Left Corner, DFS 2025-10-21
426 Convert Binary Search Tree to Sorted Doubly Linked List Medium Tree, Linked List, DFS Inorder Traversal, Recursion 2025-10-22
437 Path Sum III Medium Tree, DFS DFS, Recursion 2025-10-19
480 Sliding Window Median Hard Array, Sliding Window, Heap Two Heaps, Multiset 2025-11-04
485 Max Consecutive Ones Easy Array Counter 2025-11-04
489 Robot Room Cleaner Hard DFS, Backtracking DFS, Backtracking, Robot Navigation 2025-11-24
494 Target Sum Medium Array, Dynamic Programming DP, Subset Sum 2025-10-15
498 Diagonal Traverse Medium Array, Matrix Simulation, Direction Toggle 2026-01-20
509 Fibonacci Number Easy Dynamic Programming, Math DP, Bottom-Up 2025-11-18
525 Contiguous Array Medium Array, Hash Table Prefix Sum, Hash Map 2025-11-04
528 Random Pick with Weight Medium Design, Binary Search, Prefix Sum Prefix Sum, Binary Search 2025-11-24
593 Valid Square Medium Math, Geometry Distance Calculation, Set 2025-12-02
636 Exclusive Time of Functions Medium Stack, Parsing Stack, Log Parsing 2025-10-27
645 Set Mismatch Easy Array, Hash Table, Math Mathematical Approach, Negative Marking 2026-01-19
647 Palindromic Substrings Medium String, Two Pointers Expand Around Centers 2025-11-24
387 First Unique Character in a String Easy String, Hash Table Bit Manipulation, Frequency Counting 2026-01-19
708 Insert into a Sorted Circular Linked List Medium Linked List, Circular Two Pointers, Iteration 2025-10-27
717 1-bit and 2-bit Characters Easy Array, Greedy Greedy 2025-10-29
772 Basic Calculator III Hard String, Stack, Math Stack, Recursion, Expression Evaluation 2025-11-13
850 Rectangle Area II Hard Geometry, Sweep Line, Segment Tree Sweep Line, Coordinate Compression, Segment Tree 2025-12-16
863 All Nodes Distance K in Binary Tree Medium Tree, DFS, BFS Graph Conversion, DFS, Parent Pointer 2025-10-25
503 Next Greater Element II Medium Array, Stack Monotonic Stack 2025-10-17
545 Boundary of Binary Tree Medium Tree, DFS DFS, Boundary Traversal 2025-10-21
547 Number of Provinces Medium Disjoint Set, DFS, Graph Union-Find, Connected Components 2025-12-18
648 Replace Words Medium String, Trie Trie, Hash Set 2025-10-17
690 Employee Importance Medium DFS, BFS, Hash Table DFS, Hash Map 2025-12-16
695 Max Area of Island Medium DFS, Graph, Matrix DFS, Connected Components 2025-10-21
752 Open the Lock Medium BFS, Shortest Path BFS, State Space 2025-10-21
794 Valid Tic-Tac-Toe State Medium Array, String Simulation, Validation 2025-09-24
912 Sort an Array Medium Array, Sorting Merge Sort, Heap Sort, Counting Sort 2025-10-06
921 Minimum Add to Make Parentheses Valid Medium String, Stack, Greedy Greedy, Counter 2025-11-04
938 Range Sum of BST Easy Tree, BST, DFS DFS, BST Pruning 2025-11-24
969 Pancake Sorting Medium Array, Sorting, Greedy Greedy, Two-Step Flip 2025-11-18
973 K Closest Points to Origin Medium Array, Sorting, Heap Sorting, Heap, Quickselect 2025-10-21
974 Subarray Sums Divisible by K Medium Array, Hash Table, Prefix Sum Prefix Modulo, Array 2026-02-02
981 Time Based Key-Value Store Medium Hash Table, Binary Search, Design Binary Search, Hash Map, Lower Bound 2026-01-30
983 Minimum Cost For Tickets Medium Dynamic Programming DP, Bottom-Up 2025-11-24
990 Satisfiability of Equality Equations Medium Disjoint Set, Graph Union Find, DFS 2025-10-04
994 Rotting Oranges Medium Array, Matrix, BFS Multi-source BFS, Level Tracking 2025-12-13
1094 Car Pooling Medium Array, Sorting, Simulation Bucket Sort, Event Processing 2025-10-22
1124 Longest Well-Performing Interval Medium Array, Hash Table Hash Map, Prefix Sum 2025-10-16
1206 Design Skiplist Hard Data Structures, Design Skiplist, Probabilistic Data Structure 2025-12-03
1207 Unique Number of Occurrences Easy Array, Hash Table Hash Map, Hash Set 2025-10-20
1209 Remove All Adjacent Duplicates in String II Medium String, Stack Stack, Count Tracking 2025-11-24
1242 Web Crawler Multithreaded Medium Concurrency, Multithreading Multithreading, BFS 2025-09-24
1249 Minimum Remove to Make Valid Parentheses Medium String, Stack Stack Validation, Parentheses 2025-10-22
1443 Minimum Time to Collect All Apples in a Tree Medium Tree, DFS, BFS DFS, Tree Traversal 2025-10-21
1570 Dot Product of Two Sparse Vectors Medium Hash Map, Data Structure Hash Map, Optimization 2025-10-19
1650 Lowest Common Ancestor of a Binary Tree III Medium Tree, Binary Tree, LCA Two Pointers, Tree Traversal 2025-10-21
1762 Buildings With an Ocean View Medium Array, Stack Monotonic Stack, Greedy 2025-11-24
1856 Maximum Sum of Minimum Product Medium Array, Stack Monotonic Stack, Prefix Sum 2025-10-17
1865 Finding Pairs With a Certain Sum Medium Hash Map, Data Structure Hash Map, Count Tracking 2025-10-19
1868 Product of Two Run-Length Encoded Arrays Medium Run-Length Encoding, Two Pointers Two Pointers, Array Processing 2025-10-21
2043 Simple Bank System Medium Design, Data Structure Data Structure Design 2025-10-21
2466 Count Ways To Build Good Strings Medium Dynamic Programming DP, Bottom-up, Top-down 2025-10-16
2799 Count Complete Subarrays in an Array Medium Array, Sliding Window Sliding Window, Hash Map 2025-10-17
5 Longest Palindromic Substring Medium String, Two Pointers Expand Around Center, Manacher’s Algorithm 2026-01-08
22 Generate Parentheses Medium Backtracking, String Backtracking, DFS 2026-01-12
51 N-Queens Hard Backtracking, Recursion Backtracking, Constraint Satisfaction 2026-01-12
64 Minimum Path Sum Medium Array, Dynamic Programming 2D DP, Grid Path 2026-01-10
79 Word Search Medium Array, Backtracking, Matrix DFS, Backtracking 2026-01-12
102 Binary Tree Level Order Traversal Medium Tree, BFS BFS, Level Order 2026-01-07
103 Binary Tree Zigzag Level Order Traversal Medium Tree, BFS BFS, Deque, Direction Toggle 2026-01-06
100 Same Tree Easy Tree, DFS DFS, Recursion 2026-01-19
101 Symmetric Tree Easy Tree, DFS DFS, Recursion, Mirror Comparison 2026-01-19
104 Maximum Depth of Binary Tree Easy Tree, DFS DFS, Recursion 2026-01-19
111 Minimum Depth of Binary Tree Easy Tree, DFS DFS, Recursion, Single Child Handling 2026-01-19
112 Path Sum Easy Tree, DFS DFS, Backtracking 2026-01-19
226 Invert Binary Tree Easy Tree, DFS DFS, Recursion 2026-01-19
236 Lowest Common Ancestor of a Binary Tree Medium Tree, DFS DFS, Post-order, LCA 2026-01-19
215 Kth Largest Element in an Array Medium Array, Heap, QuickSelect Min Heap, QuickSelect 2026-01-05
269 Alien Dictionary Hard Graph, Topological Sort, String Topological Sort, BFS 2026-01-14
310 Minimum Height Trees Medium Graph, Tree, Topological Sort Peeling Leaves, BFS, DFS 2026-01-14
323 Number of Connected Components in an Undirected Graph Medium Graph, Union-Find, BFS, DFS BFS, DFS, Union-Find 2026-01-07
327 Count of Range Sum Hard Array, Divide and Conquer Merge Sort, Segment Tree, Prefix Sum 2026-01-20
429 N-ary Tree Level Order Traversal Medium Tree, BFS BFS, Level Order 2026-01-07
673 Number of Longest Increasing Subsequence Medium Array, Dynamic Programming DP with Count Tracking, Binary Search 2026-01-09
692 Top K Frequent Words Medium Hash Table, Heap, Sorting Hash Map, Custom Sorting 2026-01-08
721 Accounts Merge Medium Union-Find, Graph Union-Find, Disjoint Set 2026-01-11
844 Backspace String Compare Easy String, Two Pointers Two Pointers, Backwards 2026-01-12
993 Cousins in Binary Tree Easy Tree, BFS BFS, Parent Tracking 2026-01-07
1340 Jump Game V Hard Array, Dynamic Programming DFS with Memoization 2026-01-10
1624 Largest Substring Between Two Equal Characters Easy String, Hash Table Hash Map, Character Tracking 2026-01-19
1670 Design Front Middle Back Queue Medium Design, Deque, Data Structure Two Deques, Rebalancing 2026-01-13
1701 Average Waiting Time Medium Array, Simulation Simulation, Greedy 2026-01-19
1233 Remove Sub-Folders from the Filesystem Medium Array, String, Trie, Sorting Trie, Prefix Matching 2026-01-23
1801 Number of Orders in the Backlog Medium Array, Heap, Priority Queue Priority Queue, Greedy Matching 2026-01-22
LCR 113 Course Schedule II (CN) Medium Graph, Topological Sort, DFS DFS, Three-State Coloring 2026-01-14
802 Find Eventual Safe States Medium Graph, DFS, Cycle Detection DFS, Three-State Coloring 2026-01-15
305 Number of Islands II Hard Array, Union-Find, Graph Union-Find, Incremental Connectivity 2026-01-16
307 Range Sum Query - Mutable Medium Array, Segment Tree, Binary Indexed Tree Segment Tree, Range Sum Query 2026-01-16
315 Count of Smaller Numbers After Self Hard Array, Binary Search, Fenwick Tree Fenwick Tree, Coordinate Compression 2026-01-17
3477 Number of Unplaced Fruits Medium Array, Greedy, Segment Tree Segment Tree, Leftmost Query 2026-01-16
729 My Calendar I Medium Array, Binary Search, Design Ordered Set, Interval Overlap 2026-01-17
732 My Calendar III Hard Array, Binary Search, Design, Segment Tree Sweep Line, Segment Tree, Maximum Overlap 2026-01-18
34 Find First and Last Position of Element in Sorted Array Medium Array, Binary Search Lower Bound, Upper Bound 2026-01-30
162 Find Peak Element Medium Array, Binary Search Binary Search 2026-01-30
739 Daily Temperatures Medium Array, Stack, Monotonic Stack Monotonic Stack, Right-to-Left Jumping 2026-01-29
3110 Score of a String Easy String, Array Simulation, ASCII 2026-01-18

Problems by Difficulty

Easy (28 problems)

Medium (130 problems)

Hard (20 problems)

Problems by Category

Array & Matrix

String Processing

Linked List

Tree & DFS

Dynamic Programming

Backtracking

Stack & Queue

Graph

Data Structure Design

Advanced Algorithms

Math & Bit Manipulation

Run-Length Encoding

Solution Approaches Summary

Most Common Approaches

  1. Dynamic Programming (DP) - 5 problems
  2. Monotonic Stack - 4 problems
  3. Binary Search - 4 problems
  4. Hash Map/Set - 6 problems
  5. DFS/BFS - 5 problems
  6. Backtracking - 2 problems
  7. Sliding Window - 2 problems
  8. Two Pointers - 2 problems
  9. Trie - 1 problem
  10. Disjoint Set - 1 problem
  11. Sweep Line - 1 problem
  12. Data Structure Design - 2 problems

Algorithm Patterns

  • Array Processing: Sliding window, two pointers, prefix sum
  • String Processing: Trie, hash map, monotonic stack
  • Graph Traversal: DFS, BFS, Disjoint Set
  • Optimization: Dynamic programming, greedy algorithms
  • Data Structures: Stack, queue, heap, trie
  • Search: Binary search, divide and conquer

Recent Additions

Latest Problems (January 2026)

Previous Problems (October 2025)

Tips for Problem Solving

  1. Identify the Pattern: Look for common algorithm patterns (DP, sliding window, etc.)
  2. Start Simple: Begin with brute force, then optimize
  3. Use Data Structures: Choose appropriate DS for the problem
  4. Consider Edge Cases: Handle boundary conditions
  5. Optimize Space/Time: Trade-offs between complexity and efficiency

Last updated: February 2, 2026 Total problems solved: 177