Amazon ❤️ Trees; Google ❤️ Graphs; Microsoft ❤️ DP; Meta ❤️ fusion => interviewers ❤️ DSA
1502
Nov 05, 2025

Hey peers 👋

You ever notice how every company seems to have a DSA crush?
Amazon can’t stop talking about Trees 🌳,
Google flirts with Graphs 🔗,
and Microsoft? They’re in a long-term relationship with DP 🧩.

So here’s my own curation — not a “do-these-and-get-a-job” list, but problems that actually made me think differently.
Every one of these forced me to slow down, rethink a pattern, or say “wait... that actually connects.”

🌳 Amazon — The Tree Therapy Section

“If recursion isn’t clicking yet, you haven’t met the right tree.”

🪴 Problems I’ll never forget:

Binary Tree Inorder, Preorder, Postorder Traversal
Level Order Traversal / Zigzag Traversal
Vertical Order Traversal / Top View / Bottom View
Diameter of Binary Tree
Height / Balanced Binary Tree
Path Sum (I, II, III)
Lowest Common Ancestor (LCA)
Construct Binary Tree from Inorder + Preorder / Postorder
Flatten Binary Tree to Linked List
Serialize and Deserialize Binary Tree
Maximum Path Sum
Symmetric Tree
Binary Tree All Side Views
Binary Tree Cameras
Recover BST
BST Iterator
Kth Smallest Element
Validate BST
Convert Sorted List to BST
House Robber III (Tree DP crossover)

💡 What I learned:

Every tree problem is a meditation on recursion — when to go deep, when to stop.
The best solutions aren’t about memorizing traversals, but about seeing how data flows up and down a tree.
“Postorder” is just another way to say “solve children first, trust them later.”

🔗 Google — Graphs, Grids, and Organized Chaos

“If you can visualize it, you can solve it.”

🧭 Core patterns that changed everything:

Number of Islands / Surrounded Regions / Rotting Oranges
Clone Graph
Course Schedule I & II
Alien Dictionary
Evaluate Division
Network Delay Time
Word Ladder I & II
Pacific Atlantic Water Flow
Minimum Height Trees
Reconstruct Itinerary
Accounts Merge
Redundant Connection (Union-Find)
Graph Valid Tree
Path with Minimum Effort
Word Search (Backtracking)
Minimum Genetic Mutation
Bus Routes
Critical Connections in a Network (Tarjan’s Algo)
Find Eventual Safe States

💡 What I learned:

Graphs are less about algorithms and more about abstraction.
Once you model a problem as a graph — edges, nodes, relationships — the path forward becomes clear.
“DFS or BFS?” isn’t the question — “What’s my representation?” is.
Visualize the flow. The moment you see the graph in your mind, your code follows naturally.

🧩 Microsoft — The DP Relationship Saga

“Dynamic Programming: where pain meets predictability.”

The emotional rollercoaster list:

Climbing Stairs / House Robber (I, II, III)
Coin Change (I & II)
Unique Paths / Minimum Path Sum
Longest Increasing Subsequence
Edit Distance
Partition Equal Subset Sum / Target Sum
Palindromic Substrings
Longest Palindromic Subsequence
Decode Ways
Distinct Subsequences
Jump Game (I, II, VII)
Triangle Minimum Path Sum
Minimum Cost to Cut a Stick
Burst Balloons
Dungeon Game
Interleaving StringWord Break I & II
Cherry Pickup / Cherry Pickup II
LCS / Regular Expression Matching / Wildcard Matching
0/1 Knapsack Variants
Stock Problems (I–VI)
Perfect Squares
Paint House / Minimum Falling Path Sum
Domino and Tromino Tiling
Longest String Chain
Ones and Zeroes

💡 What I learned:

DP is just caching regret — so you don’t redo bad choices.
It’s not about remembering formulas. It’s about recognizing subproblems before they repeat.
When you find yourself recomputing something, that’s DP’s whisper: “Hey, store that.”
True mastery isn’t when you memorize transitions — it’s when you predict them.

⚙️ The Crossover Zone — When Patterns Collide

This is where recursion, DP, and design all have a coffee together. ☕

🧩 Problems that blend ideas beautifully:

LRU / LFU Cache (DS + Design)
Implement Trie / Word Search II (Trie + DFS)
Longest Increasing Path in a Matrix (Graph + DP)
Median of Two Sorted Arrays (Math + Binary Search)
Koko Eating Bananas / Split Array Largest Sum / Capacity to Ship Packages (Binary Search on Answers)
Find Median from Data Stream (Heaps + Logic)
Sliding Window Maximum
Minimum Window Substring
Subarray Sum Equals K
Longest Substring Without Repeating Characters
Merge / Insert / Non-overlapping Intervals
Meeting Rooms II
Top K Frequent Elements
N-Queens / Sudoku Solver / Combination Sum Variants
Generate Parentheses
Spiral Matrix / Rotate Image
Search a 2D Matrix / Game of Life

💡 What I learned:

Most “hard” problems are just fusions of easy ones.
You stop seeing “Tree vs Graph vs DP” — you just see reusable building blocks.
Once you can mix patterns intuitively, you’re no longer solving problems — you’re designing them.

🧮 Bit Manipulation & Math — The Art of Shortcuts

“Sometimes clever > complex.”

⚡ Smart brain ticklers:

Single Number (I, II, III)
Counting Bits
Missing Number
Reverse Bits
Bitwise AND of Numbers Range
Hamming Distance
Power of Two / Three / Four
Maximum XOR of Two Numbers
Gray Code
Subsets XOR Sum
Pow(x, n) / Sqrt(x)
Happy Number
Integer Break
Majority Element (I, II)
Count Primes (Sieve)
Factorial Trailing Zeroes

💡 What I learned:

Bit tricks are logic puzzles in disguise.

The elegance of XOR — “cancel what repeats, keep what’s unique” — is how simplicity wins.

Math intuition > memorized algorithms.

🪞 Meta-Patterns That Changed How I Think

💭 1. Recursion Mindset:
If you can break it, you can solve it.
Base + break + combine — that’s 90% of recursion.

💭 2. Sliding Window Realization:
Every “subarray/substring” problem is a moving window with a constraint.
The trick is learning when to shrink.

💭 3. Binary Search on Answers:
If the question says “minimum x such that condition holds”, stop looping — binary search it.

💭 4. Greedy Wisdom:
Greedy is valid when local decisions don’t ruin global structure.
Prove it once; trust it always.

💭 5. DP Evolution:
Brute Force → Recursion → Memoization → Tabulation → Space Optimization.
Every level forces you to think cleaner, not just faster.

✨ What This Journey Taught Me

Don’t chase problem counts. Chase insights.
Revisit old problems. If you can explain why your past solution worked — you’ve grown.
Connect problems mentally — that’s how patterns stick.
Learn to pause after every Accepted — and ask: What was the pattern behind this one?
There’s a moment in your DSA journey when everything stops feeling random — that’s when intuition takes over.

💬 Now You Tell Me

What’s that one problem that made everything click for you?
Drop it below 👇 — I’ll keep updating this post with your gems in the next edition:
“DSA Enlightenment — When Patterns Connect Themselves.” 😎

Comments (2)