TGViewer
Coding Interview Resources Coding Interview Resources @crackingthecodinginterview · 52.1K subscribers
Post #1167 8.74K
Clear all DSA rounds,

By mastering these 20 DSA patterns

1. Fast and Slow Pointer
- Cycle detection method
- O(1) space efficiency
- Linked list problems

2. Merge Intervals
- Sort and merge
- O(n log n) complexity
- Overlapping interval handling

3. Sliding Window
- Fixed/variable window
- O(n) time optimization
- Subarray/substring problems

4. Islands (Matrix Traversal)
- DFS/BFS traversal
- Connected component detection
- 2D grid problems

5. Two Pointers
- Dual pointer strategy
- Linear time complexity
- Array/list problems

6. Cyclic Sort
- Sorting in cycles
- O(n) time complexity
- Constant space usage

7. In-place Reversal of Linked List
- Reverse without extra space
- O(n) time efficiency
- Pointer manipulation technique

8. Breadth First Search
- Level-by-level traversal
- Uses queue structure
- Shortest path problems

9. Depth First Search
- Recursive/backtracking approach
- Uses stack (or recursion)
- Tree/graph traversal

10. Two Heaps
- Max and min heaps
- Median tracking efficiently
- O(log n) insertions

11. Subsets
- Generate all subsets
- Recursive or iterative
- Backtracking or bitmasking

12. Modified Binary Search
- Search in variations
- O(log n) time
- Rotated/specialized arrays

13. Bitwise XOR
- Toggle bits operation
- O(1) space complexity
- Efficient for pairing

14. Top 'K' elements
- Use heap/quickselect
- O(n log k) time
- Efficient selection problem

15. K-way Merge
- Merge sorted lists
- Min-heap based approach
- O(n log k) complexity

16. 0/1 Knapsack (Dynamic Programming)
- Choose or skip items
- O(n * W) complexity
- Maximize value selection

17. Unbounded Knapsack (Dynamic Programming)
- Unlimited item choices
- O(n * W) complexity
- Multiple item selection

18. Topological Sort (Graphs)
- Directed acyclic graph
- Order dependency resolution
- Uses DFS or BFS

19. Monotonic Stack
- Maintain increasing/decreasing stack
- Optimized for range queries
- O(n) time complexity

20. Backtracking
- Recursive decision-making
- Explore all possibilities
- Pruning with constraints

Best DSA Resources: 👇
https://topmate.io/coding/886874

All the best 👍👍
  • 👍 14
  • 👏 1
More from @crackingthecodinginterview
  1. Oct 16, 2026𝗗𝗮𝘁𝗮 𝘀𝗰𝗶𝗲𝗻𝗰𝗲 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗪𝗶𝘁𝗵 𝗔𝗜😍 Future Ready Data Scien…
  2. Oct 16, 2026If you're working with data pipelines, these repositories are very useful: 🚀📊 ibis: A Py…
  3. Oct 13, 2026𝗧𝗢𝗣 𝗙𝗥𝗘𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗧𝗢 𝗕𝗢𝗢𝗦𝗧 𝗬𝗢𝗨𝗥 𝗦𝗞𝗜𝗟𝗟𝗦 𝗜𝗡 𝟮𝟬𝟮𝟲! Explor…
  4. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  5. Oct 9, 2026🔥 SQL Interview Case Studies (Advanced Business Scenarios) 💯 🧠 Case Study 1: Find Repea…
  6. Oct 9, 2026🇮🇳 𝗚𝗢𝗩𝗘𝗥𝗡𝗠𝗘𝗡𝗧 𝗢𝗙 𝗜𝗡𝗗𝗜𝗔 — 𝗔𝗜𝗖𝗧𝗘 𝗜𝗡𝗧𝗘𝗥𝗡𝗦𝗛𝗜𝗣𝗦 𝟮𝟬𝟮𝟲 🚀…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →