CODE & DSA · PROBLEM LIBRARY
Understand. Trace. Implement.
150 authored problems · 0 planned. Pattern lessons and problem practice have separate progress.
Review the 15 pattern foundationsHashing foundations · Tree foundations · Disjoint-set foundations
150 matching problems
Two Sum
DSA-001 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Contains Duplicate
DSA-002 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Valid Anagram
DSA-003 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Group Anagrams
DSA-004 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Product of Array Except Self
DSA-005 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Longest Consecutive Sequence
DSA-006 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Majority Element
DSA-007 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Rotate Array
DSA-008 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Set Matrix Zeroes
DSA-009 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Spiral Matrix
DSA-010 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Rotate Image
DSA-011 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Sort Colors
DSA-012 · Arrays, hashing, and matrix foundations — 12 problems · Java reference verified
Attempt before reading the solution →Valid Palindrome
DSA-013 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Two Sum in a Sorted Array
DSA-014 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →3Sum
DSA-015 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Container With Most Water
DSA-016 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Trapping Rain Water
DSA-017 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Remove Duplicates from Sorted Array
DSA-018 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Move Zeroes
DSA-019 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Squares of a Sorted Array
DSA-020 · Two pointers and ordered elimination — 8 problems · Java reference verified
Attempt before reading the solution →Longest Substring Without Repeating Characters
DSA-021 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Longest Repeating Character Replacement
DSA-022 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Permutation in String
DSA-023 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Find All Anagrams in a String
DSA-024 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Minimum Window Substring
DSA-025 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Minimum Size Subarray Sum — Positive Inputs
DSA-026 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Sliding Window Maximum
DSA-027 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Longest Ones with at Most K Flips
DSA-028 · Sliding windows — 8 problems · Java reference verified
Attempt before reading the solution →Range Sum Query — Immutable
DSA-029 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Subarray Sum Equals K
DSA-030 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Contiguous Array — Equal Zeroes and Ones
DSA-031 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Subarray Product Less Than K
DSA-032 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Count Subarrays Divisible by K
DSA-033 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Range Sum Query 2D — Immutable
DSA-034 · Prefix sums and range state — 6 problems · Java reference verified
Attempt before reading the solution →Merge Intervals
DSA-035 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Insert Interval
DSA-036 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Non-overlapping Intervals
DSA-037 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Meeting Rooms — Conflict Detection
DSA-038 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Meeting Rooms II — Resource Count
DSA-039 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Minimum Arrows to Burst Balloons
DSA-040 · Intervals and scheduling — 6 problems · Java reference verified
Attempt before reading the solution →Valid Parentheses
DSA-041 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Min Stack
DSA-042 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Evaluate Reverse Polish Notation
DSA-043 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Daily Temperatures
DSA-044 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Next Greater Element — Circular Array
DSA-045 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Largest Rectangle in Histogram
DSA-046 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Asteroid Collision
DSA-047 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Simplify Absolute Path
DSA-048 · Stacks, parsing, and monotonic structure — 8 problems · Java reference verified
Attempt before reading the solution →Reverse Linked List
DSA-049 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Merge Two Sorted Lists
DSA-050 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Linked List Cycle Detection
DSA-051 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Find Linked List Cycle Entry
DSA-052 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Remove Nth Node from End
DSA-053 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Reorder List
DSA-054 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Intersection of Two Linked Lists
DSA-055 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Palindrome Linked List
DSA-056 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Add Two Numbers — Reversed Digits
DSA-057 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Copy List with Random Pointer
DSA-058 · Linked lists and pointer invariants — 10 problems · Java reference verified
Attempt before reading the solution →Binary Search — Exact Lookup
DSA-059 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Search Insert Position — Lower Bound
DSA-060 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →First and Last Position of a Target
DSA-061 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Search in Rotated Sorted Array
DSA-062 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Minimum in Rotated Sorted Array
DSA-063 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Find a Peak Element
DSA-064 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Search a Row-major Sorted Matrix
DSA-065 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Koko Eating Bananas — Minimum Feasible Rate
DSA-066 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Capacity to Ship Packages Within D Days
DSA-067 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Median of Two Sorted Arrays
DSA-068 · Binary search and monotone feasibility — 10 problems · Java reference verified
Attempt before reading the solution →Kth Largest Element in an Array
DSA-069 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Top K Frequent Elements
DSA-070 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →K Closest Points to Origin
DSA-071 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Merge K Sorted Lists
DSA-072 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Find Median from Data Stream
DSA-073 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Smallest Range Covering K Sorted Lists
DSA-074 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Kth Largest Element in a Stream
DSA-075 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Task Scheduler with Cooldown
DSA-076 · Heaps, selection, and streaming — 8 problems · Java reference verified
Attempt before reading the solution →Maximum Depth of Binary Tree
DSA-077 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Invert Binary Tree
DSA-078 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Same Tree
DSA-079 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Symmetric Tree
DSA-080 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Binary Tree Level Order Traversal
DSA-081 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Diameter of Binary Tree
DSA-082 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Balanced Binary Tree
DSA-083 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Validate Binary Search Tree
DSA-084 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Kth Smallest Element in a BST
DSA-085 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Lowest Common Ancestor of a Binary Tree
DSA-086 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Serialize and Deserialize Binary Tree
DSA-087 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Binary Tree Maximum Path Sum
DSA-088 · Binary trees and search trees — 12 problems · Java reference verified
Attempt before reading the solution →Implement Trie — Insert, Search, Prefix
DSA-089 · Tries and dictionary search — 4 problems · Java reference verified
Attempt before reading the solution →Word Dictionary with Wildcard Search
DSA-090 · Tries and dictionary search — 4 problems · Java reference verified
Attempt before reading the solution →Word Search II
DSA-091 · Tries and dictionary search — 4 problems · Java reference verified
Attempt before reading the solution →Replace Words with Shortest Root
DSA-092 · Tries and dictionary search — 4 problems · Java reference verified
Attempt before reading the solution →Number of Islands
DSA-093 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Maximum Area of Island
DSA-094 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Flood Fill
DSA-095 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Clone Graph
DSA-096 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Rotting Oranges
DSA-097 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Walls and Gates — Nearest Gate Distance
DSA-098 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Surrounded Regions
DSA-099 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Pacific Atlantic Water Flow
DSA-100 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Shortest Path in a Binary Matrix
DSA-101 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Word Ladder
DSA-102 · Graph and grid traversal — 10 problems · Java reference verified
Attempt before reading the solution →Course Schedule — Feasibility
DSA-103 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Course Schedule II — Ordering
DSA-104 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Alien Dictionary
DSA-105 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Eventual Safe States
DSA-106 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Parallel Courses — Minimum Semesters
DSA-107 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Longest Increasing Path in a Matrix
DSA-108 · DAGs, dependency ordering, and topological state — 6 problems · Java reference verified
Attempt before reading the solution →Number of Provinces
DSA-109 · Disjoint-set connectivity — 4 problems · Java reference verified
Attempt before reading the solution →Redundant Connection
DSA-110 · Disjoint-set connectivity — 4 problems · Java reference verified
Attempt before reading the solution →Accounts Merge
DSA-111 · Disjoint-set connectivity — 4 problems · Java reference verified
Attempt before reading the solution →Connected Components in an Undirected Graph
DSA-112 · Disjoint-set connectivity — 4 problems · Java reference verified
Attempt before reading the solution →Network Delay Time
DSA-113 · Weighted paths and spanning connectivity — 5 problems · Java reference verified
Attempt before reading the solution →Cheapest Flights Within K Stops
DSA-114 · Weighted paths and spanning connectivity — 5 problems · Java reference verified
Attempt before reading the solution →Path with Minimum Effort
DSA-115 · Weighted paths and spanning connectivity — 5 problems · Java reference verified
Attempt before reading the solution →0–1 BFS — Binary Edge Weights
DSA-116 · Weighted paths and spanning connectivity — 5 problems · Java reference verified
Attempt before reading the solution →Minimum Cost to Connect Points
DSA-117 · Weighted paths and spanning connectivity — 5 problems · Java reference verified
Attempt before reading the solution →Subsets
DSA-118 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Subsets II — Duplicates
DSA-119 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Permutations
DSA-120 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Permutations II — Duplicates
DSA-121 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Combination Sum — Reusable Candidates
DSA-122 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Combination Sum II — Each Candidate Once
DSA-123 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Word Search — Single Word
DSA-124 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →N-Queens
DSA-125 · Backtracking and constructive enumeration — 8 problems · Java reference verified
Attempt before reading the solution →Climbing Stairs
DSA-126 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Min Cost Climbing Stairs
DSA-127 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →House Robber
DSA-128 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →House Robber II
DSA-129 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Coin Change — Minimum Coins
DSA-130 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Coin Change II — Combination Count
DSA-131 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Word Break
DSA-132 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Longest Increasing Subsequence
DSA-133 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Longest Common Subsequence
DSA-134 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Edit Distance
DSA-135 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Unique Paths
DSA-136 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Minimum Path Sum
DSA-137 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Partition Equal Subset Sum
DSA-138 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Decode Ways
DSA-139 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Maximum Product Subarray
DSA-140 · Dynamic programming and state derivation — 15 problems · Java reference verified
Attempt before reading the solution →Jump Game — Reachability
DSA-141 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Jump Game II — Minimum Jumps
DSA-142 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Gas Station
DSA-143 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Partition Labels
DSA-144 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Queue Reconstruction by Height
DSA-145 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Best Time to Buy and Sell Stock — One Transaction
DSA-146 · Greedy choices and exchange arguments — 6 problems · Java reference verified
Attempt before reading the solution →Single Number
DSA-147 · Bit operations and numeric contracts — 3 problems · Java reference verified
Attempt before reading the solution →Counting Bits
DSA-148 · Bit operations and numeric contracts — 3 problems · Java reference verified
Attempt before reading the solution →Power x to n
DSA-149 · Bit operations and numeric contracts — 3 problems · Java reference verified
Attempt before reading the solution →LRU Cache
DSA-150 · Hash-indexed linked-list design — 1 problems · Java reference verified
Attempt before reading the solution →