Strategic guide to company-specific DSA preparation: Google's focus on graphs and DP, Meta's emphasis on arrays and trees, Amazon's leadership principles alignment with system design and BFS.
Search for a target in a matrix where each row and column is sorted. O(m+n) solution using top-right corner elimination — a classic Google interview problem.
Derive character ordering from a sorted alien dictionary using topological sort. Build a directed graph from adjacent word comparisons and apply Kahn's BFS algorithm.
Find the maximum in every sliding window of size k using a monotonic decreasing deque. O(n) solution that Google uses to test understanding of amortised data structures.