EngineeringFree

DSA

Column Schema

(7 columns)
Schema locked
ProblemtextPRIMARY
Tagtag
Leetcodelink
Notesrichtext
Difficultyselect
Tiptext
Prioritypriority

Board Preview

100 of 100 rows
#
Problemtext
Tagtag
Leetcodelink
Notesrichtext
Difficultyselect
Tiptext
Prioritypriority
1Linked List
Linked ListPattern Template
2Graph
GraphPattern Template
3Trees & BST
Trees & BSTPattern Template
DFS · BFS · BST Property · Construction
4Decision Tree
Meta Skills
5How Patterns Build on Each Other
Meta Skills
6Production Use-case
Meta Skills
7Production Cheat Sheet
Meta Skills
8Two Pointer
Two PointerPattern Template
Sorted array, find pair/triplet, converge from both ends, palindrome
9Remove Duplicates from Sorted Array
Two Pointer100 DSA
leetcode.com/problems/remove-duplicates-from-sorted-array
Easy
Keep swapping non-equal numbers
10Move Zeroes to End
Two Pointer100 DSA
leetcode.com/problems/move-zeroes
Easy
Keep swapping non-zero numbers
11Is Subsequence
Two Pointer
Notes
Easy
Simple loop and check
12Valid Palindrome
Two Pointer100 DSA
leetcode.com/problems/valid-palindrome
Easy
Regex for isAlphaNum, rest is 2 pointer
13Next Permutation
Two Pointer
Notes
Medium
Find rightmost ascending pair, swap with next larger, reverse suffix
14Sort Colors
Two Pointer100 DSA
leetcode.com/problems/sort-colors
Medium
3 pointer with boundaries (Dutch National Flag)
153Sum
Two Pointer100 DSA
leetcode.com/problems/3sum
Medium
sort, 1 for loop + 1 while loop + 2 pointer
164Sum
Two Pointer
Notes
Medium
2 loops + 2 pointer
173Sum Closest
Two Pointer
Notes
Medium
Similar to 3 Sum
18Container With Most Water
Two PointerSliding Window100 DSA
leetcode.com/problems/container-with-most-water
Medium
width x height, just keep finding max by sliding
19 Trapping Rain Water
Two Pointer100 DSA
leetcode.com/problems/trapping-rain-water
Hard
Lmax[] & Rmax[] for every value, then total rmax - height
20Sliding Window
Sliding WindowPattern Template
Easy
Contiguous subarray/substring, "at most K distinct", window condition
21Longest Substring Without Repeating Chars
Sliding Window100 DSA
leetcode.com/problems/longest-substring-without-repeating-characters/description
Medium
Map for frequency of characters
22Minimum Size Subarray Sum
Sliding Window100 DSA
leetcode.com/problems/minimum-size-subarray-sum
Medium
Sliding window is O(n)
23Minimum Window Substring
Sliding Window100 DSA
leetcode.com/problems/minimum-window-substring
Hard
Expand right to include all chars, shrink left to minimize
24Max Consecutive 1s
Sliding Window100 DSA
leetcode.com/problems/max-consecutive-ones
Easy
Simple currentCounter & resultCounter
25Longest Repeating Character Replacement
Sliding Window100 DSA
leetcode.com/problems/longest-repeating-character-replacement/description
Medium
Letters to Replace = (Size of the Window) - (Count of the Most Frequent Character)
26Fruit Into Baskets
Sliding Window100 DSA
leetcode.com/problems/fruit-into-baskets
Medium
maintain map to check the size, size represents the #of baskets
27Sliding Window Maximum
Sliding Window100 DSA
leetcode.com/problems/sliding-window-maximum
Hard
simple sliding window and deque
28Number of Substrings Containing All Three Characters
Sliding Window100 DSA
leetcode.com/problems/number-of-substrings-containing-all-three-characters
Medium
freq array, counting in a sliding window
29Substrings of Size 3 with Distinct Chars
Sliding Window
Notes
Easy
SW + map
30 Shortest Subarray with Sum ≥ K
Sliding Window
Notes
Hard
Monotonic deque of prefix sums
31Prefix Sum + HashMap
Prefix + HashMapPattern Template
"Subarray sum = K", "divisible by K", "count subarrays with XOR", set lookup
32 Subarray Sum Equals K
Prefix + HashMap100 DSA
leetcode.com/problems/subarray-sum-equals-k
Medium
prefixSum - target in map
33Longest Consecutive Sequence
Prefix + HashMap100 DSA
leetcode.com/problems/longest-consecutive-sequence
Medium
Find smallest, count increments
34Group Anagrams
Prefix + HashMap100 DSA
leetcode.com/problems/group-anagrams
Medium
Array.from(map.values())
35Continuous Subarray Sum
Prefix + HashMap100 DSA
leetcode.com/problems/continuous-subarray-sum
Medium
prefixSum % k seen before → multiple of k
36Largest Subarray with 0 Sum
Prefix + HashMap100 DSA
www.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1
Medium
If sum repeats → zero subarray
37Two Sum
Prefix + HashMap100 DSA
leetcode.com/problems/two-sum
Easy
find target - sum
38Equilibrium Index
Prefix + HashMap
Notes
Easy
Prefix Sum
39Intersection of Two Arrays
Prefix + HashMap
Notes
Easy
Insert A1 in set, check A2
40Unique Number of Occurrences
Prefix + HashMap
Notes
Easy
Unique occurrences, not unique numbers
41 Partition Array Into Three Parts
Prefix + HashMap
Notes
Medium
Count all sums = sum/3
42Binary Search
Binary SearchPattern Template
Sorted input, "minimum maximum", "maximize minimum", "find K-th"
43Search in Rotated Sorted Array
Binary Search100 DSA
leetcode.com/problems/search-in-rotated-sorted-array
Medium
If low < mid then left half is sorted
44Find Peak Element
Binary Search100 DSA
leetcode.com/problems/find-peak-element
Medium
nums[mid] < nums[mid-1] → peak in 0 to mid-1
45Koko Eating Bananas
Binary Search100 DSA
leetcode.com/problems/koko-eating-bananas
Medium
lo=1, hi=max(piles), check if canEat(mid) in h hours
46 Capacity to Ship Packages Within D Days
Binary Search100 DSA
leetcode.com/problems/capacity-to-ship-packages-within-d-days
Medium
lo=max(w), hi=sum(w), canShip(mid) in D days
47 Single Element in Sorted Array
Binary Search100 DSA
leetcode.com/problems/single-element-in-a-sorted-array
Medium
[odd]==[even], check where broken
48Split Array Largest Sum
Binary Search100 DSA
leetcode.com/problems/split-array-largest-sum/description
Medium
Same template — minimize the max subarray sum
49Allocate Books
Binary Search100 DSA
Notes
Medium
Same as Split Array Largest Sum
50Find K-th Smallest Pair Distance
Binary Search100 DSA
leetcode.com/problems/find-k-th-smallest-pair-distance
Hard
lo=0, hi=max-min, count pairs with dist ≤ mid
51Median of Two Sorted Arrays
Binary Search100 DSA
leetcode.com/problems/median-of-two-sorted-arrays
Hard
Make cut1, cut2 for partition
52 First Bad Version
Binary Search
Notes
Easy
Basic BS template
53Search a 2D Matrix
Binary Search
Notes
Medium
Treat 2D as 1D: row = mid/cols, col = mid%cols
54Min Days to Make m Bouquets
Binary Search
Notes
Medium
lo=1, hi=max(days), canMake(mid) m bouquets
55Chess Tournament
Binary Search
Notes
Medium
Similar to allocate books
56Magnetic Force Between Two Balls
Binary Search
Notes
Medium
Similar to previous
57Kth Smallest in Multiplication Table
Binary Search
Notes
Medium
Count values ≤ mid using min(mid/i, n) per row
58K-th Element of Two Sorted Arrays
Binary Search
Notes
Hard
Make cut1, cut2 for partition
59Max Sum of Rectangle No Larger Than K
Binary Search
Notes
Hard
Iterate cols, prefix sum rows, sorted set for max ≤ K
60Kadane's Algorithm
Kadane's AlgorithmPattern Template
"Maximum subarray sum", "max contiguous length"
61Maximum Subarray Sum
Kadane's Algorithm100 DSA
leetcode.com/problems/maximum-subarray/description
Medium
Kadane's — simple curMax & res
62Max Circular Subarray Sum
Kadane's Algorithm100 DSA
leetcode.com/problems/maximum-sum-circular-subarray
Medium
Circular = totalSum + max(subarray of inverted array)
63Monotonic Stack
Monotonic StackPattern Template
"Next greater element", "previous smaller", histogram area
64Min Stack
Monotonic Stack100 DSA
leetcode.com/problems/min-stack
Easy
65Valid Parentheses
Monotonic Stack100 DSA
leetcode.com/problems/valid-parentheses
Easy
66Evaluate Reverse Polish Notation
Monotonic Stack100 DSA
leetcode.com/problems/evaluate-reverse-polish-notation
Easy
67 Daily Temperatures
Monotonic Stack100 DSA
leetcode.com/problems/daily-temperatures
Medium
Gap between curr and nextGreater
68Next Greater Element I
Monotonic Stack100 DSA
leetcode.com/problems/next-greater-element-i
Medium
Map for greater of each nums[i]
69 Online Stock Span
Monotonic Stack100 DSA
Notes
Medium
Stack of (price, span); pop while top.price ≤ curr
70Largest Rectangle in Histogram
Monotonic Stack100 DSA
leetcode.com/problems/largest-rectangle-in-histogram
Hard
Uses prev & next smaller
71Maximal Rectangle
Monotonic Stack100 DSA
leetcode.com/problems/maximal-rectangle
Hard
Histogram per row
72Previous & Next Smaller
Monotonic Stack
Notes
Medium
2 monotonic stacks
73Sliding Window Maximum
Monotonic Stack
Notes
Hard
Monotonic deque — revise again
74Middle of the Linked List
Linked ListFast & Slow Pointer100 DSA
Easy
slow=1, fast=2; when fast ends, slow is mid
75Linked List Cycle
Linked ListFast & Slow Pointer100 DSA
leetcode.com/problems/linked-list-cycle
Medium
If fast === slow → cycle exists
76Linked List Cycle II
Linked ListFast & Slow Pointer100 DSA
leetcode.com/problems/linked-list-cycle-ii/description
Medium
Floyd's: after meeting, reset one to head, move both by 1
77Remove Nth Node From End
Linked ListFast & Slow Pointer100 DSA
leetcode.com/problems/remove-nth-node-from-end-of-list/description
Medium
Move fast n steps ahead, then both until fast ends
78Palindrome Linked List
Linked ListFast & Slow Pointer100 DSA
leetcode.com/problems/palindrome-linked-list
Medium
Find mid, reverse 2nd half, compare with 1st half
79Find the Duplicate Number
Linked ListFast & Slow Pointer100 DSA
Notes
Medium
Floyd's on array — find cycle entry point
80Delete the Middle Node
Linked ListFast & Slow Pointer
Notes
Medium
Copy next.val, move next.next
81Detect Loop
Linked ListFast & Slow Pointer
Notes
Medium
Until they meet
82 Detect & Remove Loop
Linked ListFast & Slow Pointer
Notes
Medium
After meeting, reset slow to head, move both by 1
83Reverse Linked List
Linked ListReversal & Rearrangement100 DSA
Easy
prev=null, curr=head; curr.next=prev; shift all
84Reverse Nodes in k-Group
Linked ListReversal & Rearrangement100 DSA
Notes
Hard
Count k nodes, reverse that segment, connect to next
85Swap Nodes in Pairs
Linked ListReversal & Rearrangement
Notes
Medium
Swap last pair, use head for previous
86 Odd Even Linked List
Linked ListReversal & Rearrangement
Notes
Medium
4 pointers: oE, oS, eS, eE
87Reorder List
Linked ListReversal & Rearrangement100 DSA
leetcode.com/problems/reorder-list
Easy
88Rotate List
Linked ListReversal & Rearrangement
Notes
Medium
Find length, k=k%len, connect tail to head, break at len-k
89Merge Two Sorted Lists
Linked ListMerge & Other100 DSA
leetcode.com/problems/merge-two-sorted-lists
Medium
Compare heads, attach smaller, advance
90Add Two Numbers
Linked ListMerge & Other100 DSA
leetcode.com/problems/add-two-numbers
Medium
Traverse both, sum digits + carry, carry = sum/10
91Remove Duplicates from Sorted List
Linked ListMerge & Other
Notes
Easy
Check and delete pointer
92Delete Node in a Linked List
Linked ListMerge & Other
Notes
Easy
Assign next's val and next
93Remove Linked List Elements
Linked ListMerge & Other
Notes
Easy
Remove initial vals, then find and skip
94Intersection of Two Linked Lists
Linked ListMerge & Other
Notes
Medium
Loop both until meet, reset to each other's head
95Union & Intersection of Linked Lists
Linked ListMerge & Other
Notes
Medium
Insert L1 in set, check L2
96 Maximum Depth
Trees & BSTDFS - Traversal & Height100 DSA
leetcode.com/problems/maximum-depth-of-binary-tree
Easy
Recursively check left & right + 1
97Inorder Traversal
Trees & BSTDFS - Traversal & Height100 DSA
leetcode.com/problems/binary-tree-inorder-traversal
Easy
left, push, right. Learn stack version too
98Preorder Traversal
Trees & BSTDFS - Traversal & Height100 DSA
leetcode.com/problems/binary-tree-preorder-traversal
Easy
push, left, right
99 Postorder Traversal
Trees & BSTDFS - Traversal & Height100 DSA
leetcode.com/problems/binary-tree-postorder-traversal
Easy
left, right, push
100 Same Tree
Trees & BSTDFS - Traversal & Height100 DSA
leetcode.com/problems/same-tree
Easy
Recursively check val, left, right; both null → true
Showing the first 100 of 336 rows.