Clear all DSA rounds
By mastering these 22 DSA patterns
- Fast and Slow Pointer
- Cycle detection method
- O(1) space efficiency
- Linked list problems
- Merge Intervals
- Sort and merge
- O(n log n) complexity
- Overlapping interval handling
- Sliding Window
- Fixed/variable window
- O(n) time optimization
- Subarray/substring problems
- Islands (Matrix Traversal)
- DFS/BFS traversal
- Connected component detection
- 2D grid problems
- Two Pointers
- Dual pointer strategy
- Linear time complexity
- Array/list problems
- Cyclic Sort
- Sorting in cycles
- O(n) time complexity
- Constant space usage
- In-place Reversal of Linked List
- Reverse without extra space
- O(n) time efficiency
- Pointer manipulation technique
- Breadth First Search
- Level-by-level traversal
- Uses queue structure
- Shortest path problems
- Depth First Search
- Recursive/backtracking approach
- Uses stack (or recursion)
- Tree/graph traversal
- Two Heaps
- Max and min heaps
- Median tracking efficiently
- O(log n) insertions
- Subsets
- Generate all subsets
- Recursive or iterative
- Backtracking or bitmasking
- Modified Binary Search
- Search in variations
- O(log n) time
- Rotated/specialized arrays
- Bitwise XOR
- Toggle bits operation
- O(1) space complexity
- Efficient for pairing
- Top 'K' elements
- Use heap/quickselect
- O(n log k) time
- Efficient selection problem
- K-way Merge
- Merge sorted lists
- Min-heap based approach
- O(n log k) complexity
- 0/1 Knapsack (Dynamic Programming)
- Choose or skip items
- O(n * W) complexity
- Maximize value selection
- Unbounded Knapsack (Dynamic Programming)
- Unlimited item choices
- O(n * W) complexity
- Multiple item selection
- Topological Sort (Graphs)
- Directed acyclic graph
- Order dependency resolution
- Uses DFS or BFS
- Monotonic Stack
- Maintain increasing/decreasing stack
- Optimized for a range queries
- O(n) time complexity
- Backtracking
- Recursive decision-making
- Explore all possibilities
- Pruning with constraints
- Union Find
- Track and merge connected components
- Used for disjoint sets
- Great for network connectivity
- Greedy Algorithm
- Make locally optimal choices
- Efficient for problems with optimal substructure
- Covers tasks like activity selection, minimum coins
HackerRank Algorithms/Logic Practice (Recommended to do first) https://hackerrank.com/domains/algorithms
Anther good playlist: https://github.com/ombharatiya/FAANG-Coding-Interview-Questions?tab=readme-ov-file#amazon
Github link to algorithm challenges https://github.com/topics/algorithm-challenges
LeetCode Blind 75 https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions
LeetCode Blind 75 Solution https://www.youtube.com/playlist?list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf
Neet Code 150 https://neetcode.io/roadmap
LeetCode Top 150 https://leetcode.com/studyplan/top-interview-150/
CodeForces Problemset https://codeforces.com/problemset
NeetCode Problems Playlist https://www.youtube.com/@NeetCode/playlists
TheCodingWorld Playlist https://www.youtube.com/playlist?list=PLYAlGR1wWgUUyYZ3wX2GdnhiL-QVhAXfR
To Check Time Complexity of Program with Explanation https://www.timecomplexity.ai/
Fraz Playlist https://www.youtube.com/@mohammadfraz/playlists
Link to Hacker Rank https://www.hackerrank.com/domains/python https://www.hackerrank.com/domains/sql
Link to Hacker Earth https://www.hackerearth.com/for-developers/
Fraz DSA Sheet https://learnyard.com/practice/dsa