
u/FormalEmployee8680

Master these 25 DSA patterns
You don't need to solve 1,000 LeetCode questions. You need to master these 25 DSA patterns.
Here is a full cheat sheet built from problems that kept repeating across 200+ MAANG+ interview experiences.
[1] Sliding window
LC: 3, 76, 209, 424, 567, 904
→ Use when the problem asks for a longest, shortest, or valid contiguous range.
[2] Two pointers
LC: 11, 15, 16, 18, 42, 167
→ Look for sorted arrays, pair conditions, or movement from both ends.
[3] Fast and slow pointers
LC: 19, 141, 142, 160, 234, 876
→ Best for linked-list cycles, middle nodes, and pointer gaps.
[4] Binary search
LC: 33, 34, 35, 153, 162, 704
→ Use when the search space is sorted or partially ordered.
[5] Binary search on answer
LC: 410, 774, 875, 1011, 1283, 1482
→ Guess an answer, test feasibility, then shrink the range.
[6] Hashing
LC: 1, 49, 128, 217, 242, 347
→ Use for quick lookup, frequency counting, grouping, and duplicate checks.
[7] Prefix sum
LC: 303, 523, 560, 724, 930, 974
→ Convert repeated range-sum work into constant-time lookups.
[8] Difference array
LC: 370, 1094, 1109, 1893, 1943, 2381
→ Use when many updates affect entire ranges.
[9] Monotonic stack
LC: 84, 85, 496, 503, 739, 907
→ Look for next greater, next smaller, span, or rectangle problems.
[10] Stack parsing
LC: 20, 71, 150, 224, 394, 735
→ Useful for expressions, nested structures, paths, and collision simulation.
[11] Queue and deque
LC: 239, 346, 362, 622, 641, 933
→ Use for rolling windows, ordered processing, and recent-event tracking.
[12] Intervals
LC: 56, 57, 252, 253, 435, 986
→ Sort by start or end time, then merge, count, or remove overlaps.
[13] Heap and top K
LC: 23, 215, 295, 347, 373, 973
→ Use when you repeatedly need the smallest, largest, or top K elements.
[14] Grid and graph BFS
LC: 127, 200, 286, 542, 752, 994
→ BFS is the default for shortest steps in an unweighted graph.
[15] Backtracking
LC: 39, 46, 78, 79, 90, 131
→ Choose, explore, undo. Use when all valid combinations must be generated.
[16] Tree DFS
LC: 98, 100, 104, 110, 124, 236
→ Decide what information each subtree should return to its parent.
[17] Tree BFS
LC: 102, 103, 199, 515, 637, 662
→ Use when the answer depends on levels, width, or visible nodes.
[18] Trie
LC: 208, 211, 212, 421, 648, 720
→ Use for prefixes, dictionaries, word search, and bitwise prefix matching.
[19] Union find
LC: 200, 261, 305, 547, 684, 721
→ Use for dynamic connectivity, grouping, and cycle detection.
[20] Topological sort
LC: 207, 210, 269, 310, 1136, 1203
→ Look for prerequisites, dependencies, ordering, or build sequences.
[21] Greedy
LC: 45, 55, 134, 435, 621, 763
→ Make the best local choice only when you can justify why it stays safe.
[22] One-dimensional DP
LC: 70, 139, 198, 213, 300, 322
→ Define the state clearly, then connect it to smaller states.
[23] Two-dimensional DP
LC: 62, 63, 64, 72, 221, 1143
→ Use when the state depends on two changing inputs or positions.
[24] Knapsack and subset DP
LC: 416, 474, 494, 518, 879, 1049
→ Look for choosing items under a limit, target, or capacity.
[25] Bit manipulation
LC: 136, 191, 231, 268, 338, 371
→ Learn XOR, masks, shifts, set-bit checks, and subset representation.
Do not solve these as 150 unrelated questions.
For every problem, write down:
→ Which pattern gave it away?
→ What changed from the standard version?
→ What would break the current solution?
→ Can you recognize the pattern within 90 seconds?
Clash of Clans - Global Chat for Thootukudi, Tirunelveli Players?
Any Clash of Clans players from Thoothukudi here? 👋
Vanakkam makkale! ❤️
We've created a Clash of Clans community called Tuty Official especially for Clashers from Thoothukudi.
The idea is simple:
• Meet local Clash players
• Share attacks and strategies
• Find clanmates
• Help each other during CWL and Clan Wars
• Build a stronger Thoothukudi Clash Community
If you're from Thoothukudi and play CoC, feel free to join the group and say hi.
Also curious—how many Clashers do we actually have in Thoothukudi? 😄
Vaa makka... Oru kai paathuralaam ❤️
If you're lazy like me.. Here is the Link 😅
https://link.clashofclans.com/?action=OpenGlobalChat&chatId=P01f99750fe074ef6b2c3f5daa4e0912f
Drop your TH level below 👇
Let's see if Tuty has any TH18's monsters hiding in this subreddit 😎
Vaa makka ❤️
[Recruiting] GREAT WARiors | #28URQLGLU | Required TH 16+ | Clan Level 18 | War/CWL | Join Now
Hey Clashers,
We're looking for 2 active TH16+ players for the upcoming CWL.
Clan Name: GREAT WARiors
Clan Tag: #28URQLGLU
League: Master III
Open Spots: 2
If you're still looking for a CWL home, we'd be happy to have you join us. We're mainly looking for players who are active and can use their attacks during CWL.
You can either:
• Comment below
• Join directly using the clan tag
If you know a friend who's still searching for a clan, feel free to send them our way.
Hope to see you in Clashers ⚔️
[Urgent] Need TH16+ for CWL (Master III) Starting Soon
Hey Clashers,
We're looking for 2 active TH16+ players for the upcoming CWL.
Clan Name: GREAT WARiors
Clan Tag: #28URQLGLU
League: Master III
Open Spots: 2
If you're still looking for a CWL home, we'd be happy to have you join us. We're mainly looking for players who are active and can use their attacks during CWL.
You can either:
• Comment below
• Join directly using the clan tag
If you know a friend who's still searching for a clan, feel free to send them our way.
Hope to see you in Clashers ⚔️
[Urgent] Need TH16+ for CWL (Master III) Starting Soon
Hey Clashers,
We're looking for 2 active TH16+ players for the upcoming CWL.
Clan Name: GREAT WARiors
Clan Tag: #28URQLGLU
League: Master III
Open Spots: 2
If you're still looking for a CWL home, we'd be happy to have you join us. We're mainly looking for players who are active and can use their attacks during CWL.
You can either:
• Comment below
• Join directly using the clan tag
If you know a friend who's still searching for a clan, feel free to send them our way.
Hope to see you in Clashers ⚔️