
Programming & AI Resources - Python, Java, C, Artificial Intelligence | Computer Science | SDE Jobs
June 21, 2025 at 12:54 PM
*You can spot 90% of the DSA patterns in Leetcode questions with this DSA patterns identification cheatsheet. It will help you identify which questions will be solved by which pattern based on keywords.*
→ Two Pointers
◘ opposite ends
◘ merging intervals
◘ skipping duplicates
◘ partitioning array
→ Sliding Window
◘ minimum length
◘ longest unique
◘ at most/at least K
◘ replace/transform window
→ Binary Search
◘ find boundary
◘ peak element
◘ rotated array
◘ kth smallest/largest
→ Fast & Slow Pointers
◘ cycle start node
◘ repeated number
◘ palindrome check
◘ intersection node
→ Breadth-First Search (BFS)
◘ minimum steps
◘ multi-source
◘ zigzag/spiral
◘ expand frontier
→ Depth-First Search (DFS)
◘ enumerate all paths
◘ subtree sum
◘ postorder processing
◘ coloring/marking
→ Backtracking
◘ valid arrangements
◘ decision tree
◘ partial solution
◘ pruning/boundary check
→ Dynamic Programming
◘ optimal substructure
◘ table filling
◘ count ways
◘ partitioning problem
→ Greedy
◘ interval scheduling
◘ earliest/latest deadline
◘ minimum jumps/coins
◘ lexicographical choice
→ Hashing / Hash Table
◘ group anagrams
◘ detect duplicates
◘ count pairs
◘ custom key mapping
→ Union Find (Disjoint Set)
◘ number of islands
◘ friend circles
◘ redundant connection
◘ find root
→ Topological Sort
◘ course ordering
◘ dependency resolution
◘ prerequisites
◘ cycle in directed graph
→ Trie
◘ word break
◘ longest prefix
◘ search suggestions
◘ word replacement
→ Heap / Priority Queue
◘ running median
◘ merge k sorted
◘ reorder tasks
◘ smallest/largest in stream
*React ❤️ for more*

❤️
❤
👍
🇮🇳
🇵🇰
🇵🇸
33