Leetcode Competitive programming- Important DSA Patterns & Problems
- Dynamic Programming
- Fibonacci Number/ Series
- Climbing Stairs (70)
- Longest Increasing Subsequence (300)
- Maximum Subarray Sum
- Coin Change (322)
- Longest Common Subsequence (1143)
- Edit Distance (72)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗙𝗶𝗯𝗼𝗻𝗮𝗰𝗰𝗶/𝗦𝗶𝗺𝗽𝗹𝗲 𝗥𝗲𝗰𝘂𝗿𝗿𝗲𝗻𝗰𝗲
Climbing Stairs — https://lnkd.in/giTchSuB
Min Cost Climbing Stairs — https://lnkd.in/g9DXiD-H
Dice Combinations — https://lnkd.in/gmwhP22y
Frog 1 — https://lnkd.in/gjviS2BP
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝟬/𝟭 𝗞𝗻𝗮𝗽𝘀𝗮𝗰𝗸
Target Sum — https://lnkd.in/gEx3dCFV
Partition Equal Subset Sum — https://lnkd.in/gESS8N7e
Knapsack — https://lnkd.in/gjha5a2G
Knapsack 1 — https://lnkd.in/gfTDwZv5
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗨𝗻𝗯𝗼𝘂𝗻𝗱𝗲𝗱 𝗞𝗻𝗮𝗽𝘀𝗮𝗰𝗸
Coin Change — https://lnkd.in/gBs2BM7j
Coin Combinations I — https://lnkd.in/gE5AWDxW
Cutting Rod — https://lnkd.in/gjGsA8ys
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗟𝗼𝗻𝗴𝗲𝘀𝘁 𝗖𝗼𝗺𝗺𝗼𝗻 𝗦𝘂𝗯𝘀𝗲𝗾𝘂𝗲𝗻𝗰𝗲 (𝗟𝗖𝗦)
Uncrossed Lines — https://lnkd.in/gEHhw6u9
Edit Distance — https://lnkd.in/gyYVE88f
LCS — https://lnkd.in/gjU5FU5r
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗟𝗼𝗻𝗴𝗲𝘀𝘁 𝗜𝗻𝗰𝗿𝗲𝗮𝘀𝗶𝗻𝗴 𝗦𝘂𝗯𝘀𝗲𝗾𝘂𝗲𝗻𝗰𝗲 (𝗟𝗜𝗦)
Longest Increasing Subsequence — https://lnkd.in/g3HAgkwK
Increasing Subsequence — https://lnkd.in/gwwUi6Xb
Vacation — https://lnkd.in/g4thCcxi
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗚𝗿𝗶𝗱-𝗕𝗮𝘀𝗲𝗱 𝗗𝗣
Unique Paths — https://lnkd.in/gckwVvmm
Grid Paths — https://lnkd.in/gzxH5Hs4
Grid 1- https://lnkd.in/g6EZArGQ
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳: 𝗜𝗻𝘁𝗲𝗿𝘃𝗮𝗹 𝗗𝗣
Burst Balloons — https://lnkd.in/gwwRtcwK
Palindrome Partitioning II — https://lnkd.in/gkiwGJZw
Slime — https://lnkd.in/gxQwjZnB
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴: 𝗧𝗿𝗲𝗲 𝗗𝗣
House Robber III — https://lnkd.in/gWJjFDTV
Tree Matching- https://lnkd.in/gY2bfrJU
Independent Set — https://lnkd.in/gF9AnQ5N
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟵: 𝗕𝗶𝘁𝗺𝗮𝘀𝗸𝗶𝗻𝗴/𝗦𝘁𝗮𝘁𝗲 𝗖𝗼𝗺𝗽𝗿𝗲𝘀𝘀𝗶𝗼𝗻
Campus Bikes II — https://lnkd.in/gNdqQkv7
Elevator Rides — https://lnkd.in/gEURDjQh
Traveling Salesman — https://lnkd.in/gfabcxXt
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭𝟬: 𝗗𝗶𝗴𝗶𝘁 𝗗𝗣
Numbers With Repeated Digits — https://lnkd.in/gRwS7GhC
Removing Digits — https://lnkd.in/g3XMWdMR
Sushi — https://lnkd.in/gKSzxYKY
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭𝟭: 𝗣𝗿𝗼𝗯𝗮𝗯𝗶𝗹𝗶𝘁𝘆/𝗘𝘅𝗽𝗲𝗰𝘁𝗮𝘁𝗶𝗼𝗻 𝗗𝗣
Dice Roll Simulation — https://lnkd.in/gstHYfP9
Candy Lottery — https://lnkd.in/gFU88CE3
Coins — https://lnkd.in/gaq5UNHq
At last, Solve the Atcoder DP Contest — https://lnkd.in/gyzWNUm4
You will be super confident after this.
2. Strings
- Reverse String
- Valid Palindrome
- Longest Substring Without Repeating Characters (3)
- Group Anagrams
- Longest Palindrome Substring
- Text Justification (68) — → Greedy
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗞𝗠𝗣 (𝗞𝗻𝘂𝘁𝗵-𝗠𝗼𝗿𝗿𝗶𝘀-𝗣𝗿𝗮𝘁𝘁) 𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺
String Matching — https://lnkd.in/g5Dvxkg8
Find the Index of the First Occurrence in a String — https://lnkd.in/gM22EcSc
Shortest Palindrome — https://lnkd.in/gE8WAQDY
Longest Happy Prefix — https://lnkd.in/gmqgamen
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝗭-𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺
String Matching — https://lnkd.in/g5Dvxkg8
Shortest Palindrome — https://lnkd.in/gE8WAQDY
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗥𝗮𝗯𝗶𝗻-𝗞𝗮𝗿𝗽 𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺
String Matching — https://lnkd.in/g5Dvxkg8
Repeated String Match — https://lnkd.in/gSbNjxTY
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗟𝗼𝗻𝗴𝗲𝘀𝘁 𝗖𝗼𝗺𝗺𝗼𝗻 𝗦𝘂𝗯𝘀𝗲𝗾𝘂𝗲𝗻𝗰𝗲
Longest Common Subsequence — https://lnkd.in/gqevW-CS
Uncrossed Lines — https://lnkd.in/gAu6Qtyx
Minimum ASCII Delete Sum for Two Strings — https://lnkd.in/gwBt3kf5
Shortest Common Supersequence — https://lnkd.in/gAtqCDNy
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗘𝗱𝗶𝘁 𝗗𝗶𝘀𝘁𝗮𝗻𝗰𝗲
Edit Distance — https://lnkd.in/gDYn6hB7
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗥𝗲𝗴𝘂𝗹𝗮𝗿 𝗘𝘅𝗽𝗿𝗲𝘀𝘀𝗶𝗼𝗻 𝗠𝗮𝘁𝗰𝗵𝗶𝗻𝗴
https://lnkd.in/gjmRPZAq
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳: 𝗣𝗮𝗹𝗶𝗻𝗱𝗿𝗼𝗺𝗲 𝗣𝗿𝗼𝗯𝗹𝗲𝗺𝘀
Palindrome Partitioning — https://lnkd.in/gZJsDcwA
Valid Palindrome II — https://lnkd.in/gXMrEW2z
Longest Palindromic Subsequence — https://lnkd.in/gUam3AYz
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴: 𝗧𝗿𝗶𝗲 (𝗣𝗿𝗲𝗳𝗶𝘅 𝗧𝗿𝗲𝗲)
https://lnkd.in/gtPBtK-R
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟵: 𝗗𝗣 𝗼𝗻 𝗜𝗻𝘁𝗲𝗿𝘃𝗮𝗹𝘀 𝗳𝗼𝗿 𝗦𝘁𝗿𝗶𝗻𝗴𝘀
Longest Palindromic Subsequence — https://lnkd.in/gUam3AYz
Palindrome Partitioning — https://lnkd.in/g936QYDa
3. Arrays
- Two Sum (1)
- Three Sum
- Best Time to Buy and Sell Stock
- Maximum Subarray (53)
- Container With Most Water
- Rotate Array
- Merge Intervals (56)
- Product of Array Except Self (238)
4. Trees
- Maximum Depth of Binary Tree
- Validate Binary Search Tree (98)
- Symmetric Tree
- Binary Tree Level Order Traversal
- Lowest Common Ancestor of a Binary Tree (235)
- Binary Tree Maximum Path Sum (124)
- Binary Tree In-order Traversal (94)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗗𝗶𝘀𝘁𝗮𝗻𝗰𝗲 𝗕𝗲𝘁𝘄𝗲𝗲𝗻 𝗡𝗼𝗱𝗲𝘀
CSES: https://lnkd.in/ghaCk3ks (Distance Queries)
LeetCode: https://lnkd.in/gDyerDvx
CSES: https://lnkd.in/gb5-Yxct (Tree Diameter)
LeetCode: https://lnkd.in/g4scg5j3
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝗦𝘂𝗺 𝗼𝗳 𝗗𝗶𝘀𝘁𝗮𝗻𝗰𝗲𝘀
CSES: https://lnkd.in/gnU885B7 (Tree Distances II)
LeetCode: https://lnkd.in/gKWrRjjD
CSES: https://lnkd.in/gDTpGbiu (Tree Distances I)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗦𝘂𝗯𝘁𝗿𝗲𝗲 𝗤𝘂𝗲𝗿𝗶𝗲𝘀
CSES: https://lnkd.in/gzeCNJRB (Subtree Queries)
CSES: https://lnkd.in/gjM9A3_k (Company Queries II)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗕𝗶𝗻𝗮𝗿𝘆 𝗟𝗶𝗳𝘁𝗶𝗻𝗴 (𝗟𝗖𝗔 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻)
CSES: https://lnkd.in/g9iz--Qm (Company Queries I)
LeetCode: https://lnkd.in/g868zcqj
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗧𝗿𝗲𝗲 𝗗𝗣
CSES: https://lnkd.in/gY2bfrJU (Tree Matching)
CSES: https://lnkd.in/gqY_jfUg (Subordinates)
LeetCode: https://lnkd.in/gSRcj_Jx
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗥𝗲𝗿𝗼𝗼𝘁𝗶𝗻𝗴 𝗧𝗲𝗰𝗵𝗻𝗶𝗾𝘂𝗲
CSES: https://lnkd.in/gDTpGbiu (Tree Distances I)
CSES: https://lnkd.in/gnU885B7 (Tree Distances II)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳: 𝗣𝗮𝘁𝗵 𝗤𝘂𝗲𝗿𝗶𝗲𝘀
CSES: https://lnkd.in/g32ABsn2 (Path Queries)
LeetCode: https://lnkd.in/gr-4FZQY
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴: 𝗧𝗿𝗲𝗲 𝗖𝗼𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻
LeetCode: https://lnkd.in/gqNjMTxk
5. Graphs
- Number of Islands (200)
- Course Schedule (207)
- Word Ladder (127)
- Clone Graph (133)
- Network Delay Time
- Graph Valid Tree (261)
- Course Schedule (207)
- Shortest Path Visiting All Nodes (847)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭 — 𝗗𝗙𝗦/𝗕𝗙𝗦 𝗧𝗿𝗮𝘃𝗲𝗿𝘀𝗮𝗹
problem1 — https://lnkd.in/g65JMZr7
problem2 — https://lnkd.in/gH8-iTtG
problem3 — https://lnkd.in/g_mCnnXn
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮 — 𝗦𝗵𝗼𝗿𝘁𝗲𝘀𝘁 𝗣𝗮𝘁𝗵 𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺𝘀
problem1 — https://lnkd.in/g9YdvpX9
problem2 — https://lnkd.in/g7SPYf7u
problem3 — https://lnkd.in/g5MguTKa
problem4 — https://lnkd.in/gAGxXhkf
problem5 — https://lnkd.in/gVf-2TmP
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯 — 𝗧𝗼𝗽𝗼𝗹𝗼𝗴𝗶𝗰𝗮𝗹 𝗦𝗼𝗿𝘁
problem1 — https://lnkd.in/gvKYD2Mg
problem2 — https://lnkd.in/gSTQK4tH
problem3 — https://lnkd.in/gsN97T7H
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰 — 𝗖𝘆𝗰𝗹𝗲 𝗗𝗲𝘁𝗲𝗰𝘁𝗶𝗼𝗻
problem1 — https://lnkd.in/g6SCp73p
problem2 — https://lnkd.in/gHRZvqfn
problem3 — https://lnkd.in/gVf9N56q
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱 — 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗲𝗱 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀
problem1 — https://lnkd.in/giYhGt49
problem2 — https://lnkd.in/gquzCwJU
problem3 — https://lnkd.in/g_FbSw_V
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲 — 𝗠𝗶𝗻𝗶𝗺𝘂𝗺 𝗦𝗽𝗮𝗻𝗻𝗶𝗻𝗴 𝗧𝗿𝗲𝗲
problem1 — https://lnkd.in/gww4pifF
problem2 — https://lnkd.in/gVf9N56q
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳 — 𝗨𝗻𝗶𝗼𝗻 𝗙𝗶𝗻𝗱
problem1 — https://lnkd.in/gSNKn8GE
problem2 — https://lnkd.in/g65JMZr7
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴 — 𝗚𝗿𝗶𝗱-𝗕𝗮𝘀𝗲𝗱 𝗚𝗿𝗮𝗽𝗵 𝗣𝗿𝗼𝗯𝗹𝗲𝗺𝘀
problem1 — https://lnkd.in/g65JMZr7
problem2 — https://lnkd.in/gxsgb_qi
problem3 — https://lnkd.in/gUxWY2hV
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟵 — 𝗚𝗿𝗮𝗽𝗵 𝗖𝗼𝗹𝗼𝗿𝗶𝗻𝗴
problem1 — https://lnkd.in/gquzCwJU
problem2 — https://lnkd.in/gpNZf7U9
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭𝟬 — 𝗦𝘁𝗿𝗼𝗻𝗴𝗹𝘆 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗲𝗱 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀
problem1 — https://lnkd.in/g_FbSw_V
problem2 — https://lnkd.in/gRvD2iez
problem3 — https://lnkd.in/gZvUU6QU
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭𝟭 — 𝗘𝘂𝗹𝗲𝗿𝗶𝗮𝗻 & 𝗛𝗮𝗺𝗶𝗹𝘁𝗼𝗻𝗶𝗮𝗻 𝗣𝗮𝘁𝗵𝘀
problem1 — https://lnkd.in/gkmSw6s2
problem2 — https://lnkd.in/g8e-Z7sh
problem3 — https://lnkd.in/gFC2Ywme
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭𝟮 — 𝗣𝗹𝗮𝗻𝗲𝘁𝘀 & 𝗤𝘂𝗲𝗿𝗶𝗲𝘀
problem1 — https://lnkd.in/gRvD2iez
problem2 — https://lnkd.in/ghmhzcjC
problem3 — https://lnkd.in/g9b757Db
problem4 — https://lnkd.in/g2r5Sjfm
6. Sorting & Searching
- Merge Sort
- Quick Sort
- Binary Search
- Search in Rotated Sorted Array
- First Bad Version
- Minimum Size Subarray Sum
7. Divide and Conquer
- Kth Largest Element in an Array (215)
- Find Peak Element (162)
- Majority Element (169)
8. Greedy Algorithms
- Gas Station (134)
- Jump Game (55)
- Partition Labels (763)
- Minimum Number of Arrows to Burst Balloons (452)
- Assign Cookies (455)
9. Backtracking
- Subsets (78)
- Permutations (46)
- Combination Sum (39)
- N-Queens (51)
- Word Search (79)
10. Heaps
- Merge k Sorted Lists (23)
- Top k Frequent Elements (347)
- Find Median from Data Stream (295)
- Kth Largest Element in an Array (215)
- Sliding Window Median (480)
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗧𝗼𝗽 𝗞 𝗘𝗹𝗲𝗺𝗲𝗻𝘁𝘀
Kth Largest Element in a Stream — https://lnkd.in/gZGhJyTX
Top K Frequent Elements — https://lnkd.in/gsNHrBXn
K Closest Points to Origin — https://lnkd.in/grSTbFQF
Last Stone Weight — https://lnkd.in/g9nW-MaS
Task Scheduler — https://lnkd.in/gckhjwSs
Top K Frequent Words — https://lnkd.in/gfV74W5D
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝗠𝗲𝗿𝗴𝗲 𝗞 𝗦𝗼𝗿𝘁𝗲𝗱 𝗦𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲𝘀
Merge k Sorted Lists — https://lnkd.in/gMbgXZ5m
Smallest Range Covering K Lists — https://lnkd.in/geHcW7Sz
Find K Pairs with Smallest Sums — https://lnkd.in/gR5nTyCV
Kth Smallest Element in Sorted Matrix — https://lnkd.in/gH4dMfwS
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗧𝘄𝗼 𝗛𝗲𝗮𝗽𝘀 𝗳𝗼𝗿 𝗠𝗲𝗱𝗶𝗮𝗻𝘀
Find Median from Data Stream — https://lnkd.in/gYskzEdK
Sliding Window Median — https://lnkd.in/gfdSwim3
IPO — https://lnkd.in/gXKH2exH
Continuous Median — https://lnkd.in/gvXFatFj
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗦𝗹𝗶𝗱𝗶𝗻𝗴 𝗪𝗶𝗻𝗱𝗼𝘄 𝗛𝗲𝗮𝗽𝘀
Sliding Window Maximum — https://lnkd.in/gj5ZhweS
Sliding Window Median (CSES) — https://lnkd.in/ggEqT7CW
Sliding Window Cost (CSES) — https://lnkd.in/gGmbS6bz
Jump Game VI — https://lnkd.in/gsEsYxTT
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗚𝗿𝗲𝗲𝗱𝘆 𝗛𝗲𝗮𝗽 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻𝘀
Minimum Cost to Connect Sticks — https://lnkd.in/gGMUxP9d
Maximum Performance Team — https://lnkd.in/g4JNtkWZ
Reorganize String — https://lnkd.in/gfupdXVA
Course Schedule III — https://lnkd.in/gQwQMvut
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗛𝗲𝗮𝗽-𝗯𝗮𝘀𝗲𝗱 𝗚𝗮𝗺𝗲 𝗧𝗵𝗲𝗼𝗿𝘆
Another Game (CSES) — https://lnkd.in/gWVh8PrE
Grundy’s Game (CSES) — https://lnkd.in/gKsReTEu
Stone Game VI — https://lnkd.in/g-ihQ72F
Minimum Initial Energy to Finish Tasks — https://lnkd.in/g_Ra7Wm9
CSES Specific Heap Problems
Sliding Median — https://lnkd.in/ggEqT7CW
Sliding Cost — https://lnkd.in/gGmbS6bz
Movie Festival II — https://lnkd.in/gfgZ9XYg
Stick Game — https://lnkd.in/gmjWJ3ad
11. Stacks & Queues
- Valid Parentheses (20)
- Implement Queue using Stacks (232)
- Min Stack (155)
- Largest Rectangle in Histogram (84)
- Sliding Window Maximum (239)
12. Linked Lists
- Reversed Linked List (206)
- Merge Two Sorted Lists (21)
- Detect Cycle in a Linked List (141)
- Remove Nth Node From End of List (19)
13. Math Concepts
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗣𝗿𝗶𝗺𝗲 𝗡𝘂𝗺𝗯𝗲𝗿𝘀 & 𝗦𝗶𝗲𝘃𝗲 𝗠𝗲𝘁𝗵𝗼𝗱𝘀
Prime Subtraction Operation — https://lnkd.in/ginQXWCG
Count Primes — https://lnkd.in/gt3ktaUV
Sum of All Subset XOR Totals — https://lnkd.in/gFaFNnUq
Four Divisors — https://lnkd.in/gW6DE9XU
Prime Number Maze — https://lnkd.in/gbbqkvz5
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝗖𝗼𝗺𝗯𝗶𝗻𝗮𝘁𝗼𝗿𝗶𝗰𝘀 & 𝗖𝗼𝘂𝗻𝘁𝗶𝗻𝗴
Unique Binary Search Trees — https://lnkd.in/gEDv_9xc
Distinct Subsequences II — https://lnkd.in/gw3_U_Cc
Number of Dice Rolls — https://lnkd.in/gUFNJ_m6
Different Ways to Add Parentheses — https://lnkd.in/g6n5k-X4
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗠𝗼𝗱𝘂𝗹𝗮𝗿 𝗔𝗿𝗶𝘁𝗵𝗺𝗲𝘁𝗶𝗰
Count Array Pairs Divisible by K — https://lnkd.in/gZb5cKPK
Number of Music Playlists — https://lnkd.in/gH4sRXYC
Sum of Divisors- https://lnkd.in/gNfrXYKx
Modulo 100 — https://lnkd.in/gFdMHuuv
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗡𝘂𝗺𝗯𝗲𝗿 𝗧𝗵𝗲𝗼𝗿𝘆 & 𝗗𝗶𝘃𝗶𝘀𝗼𝗿𝘀
Common Divisors- https://lnkd.in/gbbqkvz5
Counting Divisors- https://lnkd.in/g6fRDv6f
Sum of Divisors- https://lnkd.in/gNfrXYKx
Greatest Common Divisor- https://lnkd.in/gptvG3fW
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗚𝗲𝗼𝗺𝗲𝘁𝗿𝗶𝗰 𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺𝘀
Valid Square — https://lnkd.in/g8mMenZi
Circle and Rectangle Overlapping — https://lnkd.in/gycihwpN
Two Circles- https://lnkd.in/g-hyykDE
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗚𝗮𝗺𝗲 𝗧𝗵𝗲𝗼𝗿𝘆
Stone Game — https://lnkd.in/gCvYm3hK
Nim Game — https://lnkd.in/gwP32728
Another Game- https://lnkd.in/gWVh8PrE
Grundy’s Game- https://lnkd.in/gKsReTEu
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳: 𝗕𝗮𝘀𝗲 𝗖𝗼𝗻𝘃𝗲𝗿𝘀𝗶𝗼𝗻𝘀
Excel Sheet Column Title — https://lnkd.in/gYNDWHmK
Base 7 — https://lnkd.in/gJ3TgKqs
Convert to Base -2 — https://lnkd.in/g-CK2jQS
Digit Queries — https://lnkd.in/gTDwDXdb
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴: 𝗣𝗿𝗼𝗯𝗮𝗯𝗶𝗹𝗶𝘁𝘆 𝗧𝗵𝗲𝗼𝗿𝘆
Dice Roll Simulation — https://lnkd.in/g_ehU_v5
Random Pick with Weight — https://lnkd.in/gnQ3_5q8
Generate Random Point in Circle — https://lnkd.in/gv6WRzvs
Dice Expectation- https://lnkd.in/g_EGaj3K
14. Bit Manipulation
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟭: 𝗕𝗶𝘁𝘄𝗶𝘀𝗲 𝗔𝗡𝗗 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀
Bitwise AND of Numbers Range — https://lnkd.in/g7DhwjiF
Largest Combination With Bitwise AND Greater Than Zero — https://lnkd.in/gG_2YDUJ
SOS Bit Problem — https://lnkd.in/gT84hrFb
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟮: 𝗕𝗶𝘁𝘄𝗶𝘀𝗲 𝗢𝗥 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀
Bitwise ORs of Subarrays — https://lnkd.in/gPhbunBD
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟯: 𝗕𝗶𝘁𝘄𝗶𝘀𝗲 𝗫𝗢𝗥 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀
Single Number — https://lnkd.in/gVEcACqi
Maximum Xor Subarray — https://lnkd.in/gnhT6NCX
All Subarray Xors — https://lnkd.in/gNmxPTKN
Number of Subset Xors — https://lnkd.in/gsWjZrkA
Count Pairs With XOR in a Range — https://lnkd.in/gjNJ3yHJ
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟰: 𝗙𝗶𝗻𝗱𝗶𝗻𝗴 𝗨𝗻𝗶𝗾𝘂𝗲/𝗠𝗶𝘀𝘀𝗶𝗻𝗴 𝗘𝗹𝗲𝗺𝗲𝗻𝘁𝘀 𝗨𝘀𝗶𝗻𝗴 𝗕𝗶𝘁𝘀
Single Number — https://lnkd.in/gVEcACqi
Single Number II — https://lnkd.in/gN3256qf
Single Number III — https://lnkd.in/g8p5uczg
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟱: 𝗕𝗶𝘁 𝗖𝗼𝘂𝗻𝘁𝗶𝗻𝗴 & 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻
Number of 1 Bits — https://lnkd.in/g7ZTRCbS
Reverse Bits — https://lnkd.in/g2zM7Tei
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟲: 𝗣𝗼𝘄𝗲𝗿 𝗼𝗳 𝗧𝘄𝗼 𝗖𝗵𝗲𝗰𝗸
Power of Two — https://lnkd.in/gSp9X9_i
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟳: 𝗕𝗶𝘁 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲𝘀
Differ by 1 Bit — https://lnkd.in/gBPCYfRb
𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝟴: 𝗕𝗶𝘁 𝗠𝗮𝘀𝗸𝗶𝗻𝗴
General Bit Manipulation Problems — https://lnkd.in/gwg9WGX9
𝗜𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁 𝗕𝗶𝘁 𝗠𝗮𝗻𝗶𝗽𝘂𝗹𝗮𝘁𝗶𝗼𝗻 𝗣𝗿𝗼𝗽𝗲𝗿𝘁𝗶𝗲𝘀
XOR Properties:
a^b=c implies b^c=a and a^c=b
x⁰ = x
x^x = 0
XOR of duplicate elements cancels out, making it perfect for finding unique elements
AND Properties:
n & (n-1) clears the rightmost set bit
n & (n-1) == 0 checks if n is a power of two
For bitwise AND to be greater than zero, at least one bit must be set in the same position across all numbers
Shift Operations:
Left shift (<<): n << 1 is equivalent to n * 2
Right shift (>>): n >> 1 is equivalent to n / 2
Bit Masking Techniques:
Setting ith bit: num | (1 << i)
Clearing ith bit: num & ~(1 << i)
Toggling ith bit: num ^ (1 << i)
Checking if ith bit is set: (num & (1 << i)) != 0
📺 𝗬𝗼𝘂𝗧𝘂𝗯𝗲 𝗖𝗵𝗮𝗻𝗻𝗲𝗹𝘀
- Striver A2Z DSA Playlist
https://lnkd.in/gJXB9cnY
Covers everything from basics to advanced DSA with pseudocode clarity. Builds real problem-solving intuition. - TLE Eliminators CP-31 Sheet — https://lnkd.in/gysER5y7
2. Vivek Gupta’s Dynamic Programming Workshop
https://lnkd.in/g62GukQS
Laser-focused on advanced DP patterns and transitions. Great for mastering optimization-heavy problems.
3. Aditya Verma’s DP Playlist
https://lnkd.in/gaF9JE92
Breaks down how recursion evolves into DP. Best suited for those starting their DP journey.
📚 𝗪𝗲𝗯𝘀𝗶𝘁𝗲𝘀 𝗳𝗼𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗯𝗼𝘂𝘁 𝗮𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺𝘀
1. CP-Algorithms
https://cp-algorithms.com
Encyclopedia of high-level algorithms — from suffix arrays to heavy-light decomposition. Perfect for deep dives.
2. USACO Guide
https://usaco.guide
A curated roadmap with problem sets, concepts, and video explanations. Helps you rise from beginner to elite.
🏆 𝗣𝗿𝗮𝗰𝘁𝗶𝗰𝗲 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺𝘀
1. LeetCode
https://leetcode.com
Most popular interview platform. Weekly contests emulate the exact pace and pressure of real FAANG rounds.
2. AtCoder Educational DP Contest
https://lnkd.in/g4WYiA4p
26 hand-crafted problems to learn DP the right way — with clean, editorial-backed insights.
3. CSES Problem Set
https://cses.fi/problemset
Graph algorithms. Trees. 100+ well-thought-out problems to master core concepts.
4. Codeforces
https://codeforces.com
Legendary contests that challenge your mathematical and logical reasoning under tight time pressure.
There’s no secret formula. Just the right resources, ruthless consistency, and clear fundamentals.
Top 10 Most Asked Leetcode DSA Questions
- Two Sum with all Aproaches
- Buy & Sell Stock sell
- Target Sum
- LRU Cache
- Merge Intervals
- Detect Cycle
- Maximum Subarray
- Number of Islands
- Path with Minimum Effort
- Trapping Rain Water
- Word Break
- Candy
- Copy List with Random Pointer
- Find Minimum in Rotated Sorted Array
- Count Primes
- Implement Trie
- Maximal Rectangle
- Edit Distance
- Triangle
