Career OS

DSA Tracker

146 problems, by pattern

Your curated set. Solve on LeetCode, tick it here. When LeetCode sync is on, solves tick themselves.

0 / 146 solved

Arrays

Two Sum
Easy · Hash map complement
↗
Best Time to Buy and Sell Stock
Easy · Track running min
↗
Contains Duplicate
Easy · Set membership
↗
Product of Array Except Self
Medium · Prefix/suffix products
↗
Maximum Subarray
Medium · Kadane's
↗
Maximum Product Subarray
Medium · Track min & max
↗
Merge Intervals
Medium · Sort + sweep
↗
Insert Interval
Medium · Interval merge
↗
Rotate Array
Medium · Reverse trick
↗
Set Matrix Zeroes
Medium · In-place markers
↗

Strings

Valid Anagram
Easy · Char counts
↗
Valid Palindrome
Easy · Two pointers
↗
Longest Common Prefix
Easy · Vertical scan
↗
Reverse String
Easy · Two pointers in place
↗
Longest Palindromic Substring
Medium · Expand around center
↗
Palindromic Substrings
Medium · Expand around center
↗
Group Anagrams
Medium · Hash by sorted key
↗
Encode and Decode Strings
Medium · Length prefixing
↗
String to Integer (atoi)
Medium · Careful parsing
↗
Zigzag Conversion
Medium · Simulation
↗

Hashing

Top K Frequent Elements
Medium · Bucket sort
↗
Valid Sudoku
Medium · Sets per unit
↗
Longest Consecutive Sequence
Medium · Set + sequence start
↗
Subarray Sum Equals K
Medium · Prefix sum + map
↗
Ransom Note
Easy · Char counts
↗
First Unique Character in a String
Easy · Frequency map
↗
Intersection of Two Arrays
Easy · Set intersection
↗
4Sum II
Medium · Pair-sum map
↗
LRU Cache
Medium · Hash + doubly linked list
↗
Insert Delete GetRandom O(1)
Medium · Map + array swap
↗

Two Pointers

Two Sum II - Input Array Is Sorted
Medium · Converging pointers
↗
3Sum
Medium · Sort + two pointers
↗
Container With Most Water
Medium · Greedy shrink
↗
Trapping Rain Water
Hard · Two pointers + max
↗
Move Zeroes
Easy · Slow/fast
↗
Sort Colors
Medium · Dutch national flag
↗
3Sum Closest
Medium · Sort + two pointers
↗
Boats to Save People
Medium · Greedy pairing
↗
Is Subsequence
Easy · Two pointers
↗

Sliding Window

Longest Repeating Character Replacement
Medium · Window + max freq
↗
Permutation in String
Medium · Fixed window counts
↗
Minimum Window Substring
Hard · Shrinking window
↗
Sliding Window Maximum
Hard · Monotonic deque
↗
Maximum Average Subarray I
Easy · Fixed window sum
↗
Minimum Size Subarray Sum
Medium · Shrinking window
↗
Fruit Into Baskets
Medium · Window of 2 types
↗
Max Consecutive Ones III
Medium · Window with k flips
↗
Find All Anagrams in a String
Medium · Fixed window counts
↗

Sorting

Merge Sorted Array
Easy · Merge from back
↗
Sort an Array
Medium · Merge/quick sort
↗
Kth Largest Element in an Array
Medium · Quickselect
↗
Sort Characters By Frequency
Medium · Count + sort
↗
Largest Number
Medium · Custom comparator
↗
H-Index
Medium · Sort + count
↗
Meeting Rooms
Easy · Sort intervals
↗
Meeting Rooms II
Medium · Sort + min-heap
↗
Non-overlapping Intervals
Medium · Greedy by end
↗
Car Fleet
Medium · Sort + monotonic stack
↗

Binary Search

Binary Search
Easy · Classic
↗
Search Insert Position
Easy · Lower bound
↗
Search a 2D Matrix
Medium · Flattened binary search
↗
Koko Eating Bananas
Medium · Search on answer
↗
Find Minimum in Rotated Sorted Array
Medium · Pivot search
↗
Search in Rotated Sorted Array
Medium · Pivot search
↗
Time Based Key-Value Store
Medium · Binary search on time
↗
Median of Two Sorted Arrays
Hard · Partition search
↗
Find First and Last Position
Medium · Lower/upper bound
↗
Capacity To Ship Packages Within D Days
Medium · Search on answer
↗

Linked List

Reverse Linked List
Easy · Pointer flipping
↗
Merge Two Sorted Lists
Easy · Merge with dummy
↗
Linked List Cycle
Easy · Floyd's tortoise/hare
↗
Reorder List
Medium · Find mid + reverse + merge
↗
Remove Nth Node From End of List
Medium · Two pointers gap
↗
Copy List with Random Pointer
Medium · Interleave clone
↗
Add Two Numbers
Medium · Digit carry
↗
Find the Duplicate Number
Medium · Cycle detection
↗
Merge k Sorted Lists
Hard · Min-heap merge
↗
Reverse Nodes in k-Group
Hard · Group reversal
↗

Stack

Valid Parentheses
Easy · Matching stack
↗
Min Stack
Medium · Track min per push
↗
Evaluate Reverse Polish Notation
Medium · Operand stack
↗
Generate Parentheses
Medium · Backtracking + stack
↗
Daily Temperatures
Medium · Monotonic stack
↗
Largest Rectangle in Histogram
Hard · Monotonic stack
↗
Next Greater Element I
Easy · Monotonic stack
↗
Asteroid Collision
Medium · Simulation stack
↗
Decode String
Medium · Nested stack
↗
Simplify Path
Medium · Path stack
↗

Queue

Implement Stack using Queues
Easy · Queue rotation
↗
Implement Queue using Stacks
Easy · Two stacks
↗
Number of Recent Calls
Easy · Sliding queue
↗
Design Circular Queue
Medium · Ring buffer
↗
Moving Average from Data Stream
Easy · Fixed window queue
↗
Dota2 Senate
Medium · Two queues
↗
Task Scheduler
Medium · Greedy + queue
↗
Rotting Oranges
Medium · Multi-source BFS
↗
Walls and Gates
Medium · Multi-source BFS
↗
Open the Lock
Medium · BFS on states
↗

Trees

Invert Binary Tree
Easy · Recursion
↗
Maximum Depth of Binary Tree
Easy · DFS depth
↗
Diameter of Binary Tree
Easy · DFS + global max
↗
Balanced Binary Tree
Easy · DFS height check
↗
Same Tree
Easy · Parallel DFS
↗
Subtree of Another Tree
Easy · DFS + compare
↗
Binary Tree Level Order Traversal
Medium · BFS by level
↗
Binary Tree Right Side View
Medium · BFS last per level
↗
↗
Binary Tree Maximum Path Sum
Hard · DFS + global max
↗

BST

Lowest Common Ancestor of a BST
Medium · BST property
↗
Validate Binary Search Tree
Medium · Range bounds
↗
Kth Smallest Element in a BST
Medium · Inorder traversal
↗
Convert Sorted Array to BST
Easy · Divide + conquer
↗
Insert into a BST
Medium · BST insert
↗
Delete Node in a BST
Medium · BST delete
↗
Range Sum of BST
Easy · Pruned DFS
↗
Minimum Absolute Difference in BST
Easy · Inorder diff
↗
Binary Search Tree Iterator
Medium · Controlled inorder
↗

Heap

Kth Largest Element in a Stream
Easy · Min-heap of size k
↗
Last Stone Weight
Easy · Max-heap
↗
K Closest Points to Origin
Medium · Heap by distance
↗
Top K Frequent Words
Medium · Heap with comparator
↗
Find Median from Data Stream
Hard · Two heaps
↗
Reorganize String
Medium · Greedy max-heap
↗
Design Twitter
Medium · Heap merge feeds
↗
Single-Threaded CPU
Medium · Sort + heap
↗
Maximum Subsequence Score
Medium · Sort + min-heap
↗

Graphs

Number of Islands
Medium · Flood fill DFS/BFS
↗
Clone Graph
Medium · DFS + hash map
↗
Course Schedule
Medium · Topological sort
↗
Pacific Atlantic Water Flow
Medium · Multi-source DFS
↗
Max Area of Island
Medium · Flood fill + count
↗
Graph Valid Tree
Medium · Union-find
↗
Number of Connected Components
Medium · Union-find
↗
Word Ladder
Hard · BFS shortest path
↗

Dynamic Programming

Climbing Stairs
Easy · 1D DP (Fibonacci)
↗
House Robber
Medium · 1D DP choice
↗
Coin Change
Medium · Unbounded knapsack
↗
Longest Increasing Subsequence
Medium · DP / patience
↗
Longest Common Subsequence
Medium · 2D DP
↗
Word Break
Medium · DP over string
↗
Unique Paths
Medium · 2D grid DP
↗
Edit Distance
Medium · 2D DP
↗