K5kC 150
A curated list of 150 coding problems designed to help you master data structures and algorithms.
Total: 109 problems across 21 categories
string(1)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 271 | Encode and Decode Strings | medium |
hash table(4)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 1 | Two Sum | easy | |
| 217 | Contains Duplicate 1 - Check if array has duplicates | easy | |
| 242 | Valid Anagram | easy | |
| 49 | Group Anagrams | medium |
two pointers(6)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 125 | Valid Palindrome | easy | |
| 844 | Backspace String Compare | easy | - |
| 11 | Container With Most Water | medium | |
| 15 | 3Sum0 - Find three elements in an array that sum to a zero | medium | |
| 75 | Dutch National Flag DNF | medium | |
| 42 | Trapping Rain Water | hard | - |
sliding window(6)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 3 | Longest Substring Without Repeating Characters | medium | |
| 424 | Longest Substring with Same Letters after Replacement | medium | |
| 438 | Find anagrams of a string in another string | medium | - |
| 1248 | Count Number of Nice Subarrays | medium | - |
| 76 | Minimum Window Substring | hard | |
| 239 | Sliding Window Maximum | hard | - |
binary search(5)
sorting(3)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 179 | Largest Number From Given Numbers | medium | |
| 215 | Kth Largest Element in an Array | medium | - |
| 451 | Sort Characters By Frequency | medium | - |
bit manipulation(6)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 136 | Single Number 1 - All elements except one occur twice | easy | |
| 190 | Reverse Bits | easy | |
| 191 | Number of 1 Bits | easy | |
| 268 | Missing Number | easy | |
| 338 | Counting Bits | easy | |
| 371 | Sum of Two Integers | medium |
math(2)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 202 | Happy Number | easy | - |
| 149 | Maximum Points on a Line | hard | - |
linked list(6)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 21 | Merge Two Sorted Linked Lists | easy | |
| 141 | Linked List Cycle 1 - Detect Cycle | easy | |
| 160 | Intersection of Two Linked Lists | easy | - |
| 206 | Reverse Linked List | easy | |
| 19 | Remove Nth Node From End of List | medium | |
| 143 | Reorder List such that i-th element points to n-i-th element | medium |
stack(5)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 20 | Valid Parentheses | easy | |
| 232 | Implement Queue using Stacks | easy | - |
| 155 | Min Stack | medium | - |
| 739 | Daily Temperatures | medium | - |
| 84 | Largest Rectangle in Histogram | hard | - |
tree(13)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 100 | Same Tree | easy | |
| 101 | Symmetric Binary Tree | easy | - |
| 104 | Maximum Depth of Binary Tree | easy | |
| 226 | Invert Binary Tree | easy | |
| 572 | Subtree of Another Tree | easy | |
| 98 | Validate Binary Search Tree | medium | |
| 102 | Binary Tree Level Order Traversal - Level by Level | medium | |
| 105 | Construct Binary Tree from Inorder and Preorder Traversal | medium | |
| 230 | Kth Smallest Element in a BST | medium | |
| 235 | Lowest Common Ancestor of a Binary Search Tree | medium | |
| 648 | Replace Words | medium | - |
| 124 | Binary Tree Path Sum - Maximum between any two nodes | hard | |
| 297 | Serialize and Deserialize Binary Tree | hard |
trie(3)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 208 | Implement Trie | medium | |
| 211 | Design Add and Search Words Data Structure | medium | |
| 212 | Word Search 2 - Return All Words | hard |
graph(8)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 128 | Longest Consecutive Sequence | medium | - |
| 133 | Clone Undirected Graph | medium | - |
| 200 | Number of Islands | medium | |
| 207 | Course Schedule 1 - Is it Possible | medium | - |
| 261 | Graph Valid Tree | medium | - |
| 417 | Pacific Atlantic Water Flow | medium | - |
| 127 | Word Ladder 1 - Get Ladder Length | hard | - |
| 269 | Alien Dictionary | hard | - |
backtracking(5)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 39 | Combination Sum 1 | medium | |
| 46 | Permutations of Array 1 | medium | - |
| 78 | Subsets 1 | medium | |
| 79 | Word Search 1 - Find if word exists | medium | |
| 51 | N-Queens | hard | - |
greedy(2)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 55 | Jump Game 1 - Check if it reaches last index | medium | |
| 134 | Gas Station | medium | - |
interval(5)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 252 | Meeting Rooms 1 - Can person attend all meetings | easy | - |
| 56 | Merge Overlapping Intervals | medium | - |
| 57 | Insert Interval | medium | - |
| 253 | Maximum Intervals Overlap Count | medium | - |
| 435 | Non-overlapping Intervals | medium | - |
dynamic programming(15)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 70 | Climbing Stairs - Take atmost 2 Steps | easy | |
| 121 | Best Time To Buy And Sell Stock 1 - only one transaction | easy | |
| 5 | Longest Palindromic Substring | medium | |
| 53 | Maximum Subarray Sum | medium | |
| 62 | Unique Paths in Grid 1 - Count all paths moving right or down | medium | |
| 91 | Decode Ways | medium | |
| 139 | Word Break 1 - Check if word is breakable | medium | |
| 152 | Maximum Product Subarray | medium | |
| 198 | House Robber | medium | |
| 213 | House Robber 2 - Houses in circle | medium | |
| 300 | Longest Increasing Subsequence | medium | |
| 322 | Coin Change with Fewest Number of Coins Given Infinite Supply | medium | |
| 416 | Partition Equal Subset Sum | medium | - |
| 647 | Palindromic Substrings | medium | |
| 1143 | Longest Common Subsequence LCS 1 - Get Length | medium |
union find(4)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 323 | Number of Connected Components in an Undirected Graph | medium | - |
| 399 | Evaluate Division | medium | - |
| 684 | Redundant Connection | medium | - |
| 721 | Accounts Merge | medium | - |
heap priority queue(4)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 347 | Top K Frequent Elements | medium | |
| 621 | Task Scheduler | medium | - |
| 23 | Merge K Sorted Lists | hard | |
| 295 | Find Median from Data Stream | hard |
matrix(4)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 1572 | Matrix Diagonal Sum | easy | - |
| 44 | Rotate n x n matrix by 90 degrees | medium | |
| 54 | Spiral Matrix 1 - Return | medium | |
| 73 | Set Matrix Zeros | medium |
prefix sum(1)
| # | Problem | Difficulty | Video |
|---|---|---|---|
| 238 | Product of Array Except Self | medium |