| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A complete collection of essential Data Structures & Algorithms patterns with clean, well-explained code examples to master problem-solving code examples to master problem-solving and crack MAANG interviews. Covers core patterns like Sliding Window,Two Pointers,DP, Graphs and Backtracking with templates,complexity notes and practical interview tips
This repository is a comprehensive collection of essential Data Structures & Algorithms (DSA) patterns, designed to help you master problem-solving and crack interviews at MAANG, Swiggy, Zomato, and top startups.
Each pattern comes with:
Before diving into patterns, review these fundamental areas:
| Pattern | Description | Example Problems |
|---|---|---|
| 🪟 Sliding Window | Optimize subarray problems for max/min/sum/k-length | Longest Substring Without Repeating Characters (LeetCode #3), Max Consecutive Ones, Minimum Window Substring |
| 🎯 Two Pointers | Works on sorted data to find pairs, partitions | 3Sum, Container With Most Water, Remove Duplicates from Sorted Array |
| 🧮 Binary Search | Efficient searching or optimization | Search Rotated Array, Find Peak Element, Median of Two Sorted Arrays |
| 🧵 Fast & Slow Pointers | Detect loops or middle nodes | Linked List Cycle, Palindrome Linked List |
| 🔁 Dynamic Programming | Break down complex problems into subproblems | Longest Increasing Subsequence, House Robber, Coin Change |
| 🌳 Trees & Graphs (DFS/BFS) | Hierarchical and connected data traversal | Binary Tree Level Order, Clone Graph, Word Ladder |
| 🎲 Backtracking | Generate all combinations or paths | N-Queens, Sudoku Solver, Permutations |
| 🧭 Greedy | Local optimal → global optimal | Jump Game, Interval Scheduling, Huffman Encoding |
| 🧮 Prefix Sum / Kadane’s | Efficient range calculations | Maximum Subarray, Subarray Sum Equals K |
| 🧱 Stack & Monotonic Stack | Useful in range problems | Largest Rectangle in Histogram, Daily Temperatures |
| Company | Common Patterns | Example Problems |
|---|---|---|
| Amazon | Sliding Window, Greedy, Trees | LRU Cache, Jump Game, Binary Tree Zigzag |
| Graphs, DP, Backtracking | Word Ladder, N-Queens, LIS | |
| Meta | Two Pointers, Hashing, DP | 3Sum, Clone Graph, Coin Change |
| Netflix | Binary Search, Greedy | Container With Most Water, Meeting Rooms II |
| Swiggy | Graphs, Greedy, BFS | Minimum Path Delivery, Word Ladder |
| Zomato | DP, Sorting, Greedy | Restaurant Allocation, Activity Scheduling |
Contributions are welcome!
Pawan Kumar
📍 Product Manager | Data & DevOps Mentor | AI & Cloud Enthusiast
🔗 LinkedIn
✉️ pawankm7654@gmail.com
⭐ Star this repository if it helped you — it motivates to add more curated interview content every week!
| Back | FazBrowse Home | New Git URL |