Expedia Coding Interview Questions
31 Expedia coding interview problems with full optimal solutions — 19 easy, 11 medium, 1 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Expedia interviewer values, and a FAQ section.
- #19mediumfoundational
19. Number of Islands
Count connected land masses in a grid — Expedia applies the same BFS/DFS region-counting logic when clustering geographically adjacent hotel markets into a single search region.
- #20mediumfoundational
20. Network Delay Time
Find the time for a signal to reach all nodes from a source — Expedia uses the same Dijkstra logic to compute earliest-arrival flight connections across their global route graph.
- #21mediumfoundational
21. Meeting Rooms II
Find the minimum number of rooms to hold all meetings — the same min-heap interval logic Expedia uses to determine the minimum hotel inventory needed to cover overlapping check-in/check-out windows.
- #22mediumfoundational
22. Coin Change
Find the fewest coins to reach a target amount — Expedia's dynamic-pricing engine applies the same bottom-up DP when assembling minimum-cost fare combinations from discrete price buckets.
- #23mediumfoundational
23. Top K Frequent Elements
Return the k most frequent elements — Expedia's search-ranking pipeline uses the same frequency-heap pattern to surface the top-k destinations by booking volume without sorting the full catalog.
- #24mediumfoundational
24. Group Anagrams
Cluster strings that are anagrams of each other — Expedia applies the same canonical-key grouping to cluster airport code aliases and alternate-spelling city names into a single inventory bucket.
- #25mediumfoundational
25. Non-overlapping Intervals
Find the minimum number of intervals to remove so none overlap — Expedia uses this greedy pruning to eliminate conflicting layover windows when building the tightest valid itinerary.
- #26mediumfoundational
26. Cheapest Flights Within K Stops
Find the cheapest flight from src to dst with at most k stops — this is one of Expedia's most direct algorithm-to-product problems, modeling their core flight search with a layover constraint.
- #27mediumfoundational
27. Merge Intervals
Merge all overlapping intervals into the fewest continuous ranges — Expedia applies this to consolidate adjacent layover windows in an itinerary into a single unbroken block.
- #28easyfoundational
28. Climbing Stairs
Count distinct ways to climb n steps taking 1 or 2 at a time — Expedia uses this Fibonacci-DP warmup to probe how quickly candidates see the recurrence behind multi-stop trip combinations.
- #29mediumfoundational
29. Word Break
Determine whether a string can be segmented into dictionary words — Expedia applies this DP to validate that a raw destination-name string can be cleanly decomposed into known city and region tokens.
- #30hardfoundational
30. Find Median from Data Stream
Maintain the running median of a live price stream — Expedia's dynamic-pricing team uses the two-heap pattern to track the real-time median fare across thousands of concurrent flight searches.
- #31mediumfoundational
31. Course Schedule
Detect whether a set of task dependencies contains a cycle — Expedia's booking-pipeline team uses the same topological-sort check to verify that booking-step dependencies never create a deadlock.
- #1easyfoundational
1. Two Sum
Given an array of nums and a target, return indices of two numbers that add up to target.
- #2easyfoundational
2. Valid Parentheses
Determine if a string of brackets is properly opened and closed in the right order.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists into one sorted linked list.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Remove duplicates from a sorted array in-place and return the new length.
- #5easyfoundational
5. Remove Element
Remove all instances of a value in-place from an array and return new length.
- #6easyfoundational
6. Search Insert Position
Find target index in sorted array, or where it would be inserted to keep order.
- #7easyfoundational
7. Maximum Subarray
Find the contiguous subarray with the largest sum.
- #8easyfoundational
8. Plus One
Increment a large integer represented as a digit array by one.
- #9easyfoundational
9. Merge Sorted Array
Merge nums2 into nums1 in-place so the result is sorted.
- #10easyfoundational
10. Binary Tree Inorder Traversal
Return the inorder traversal of a binary tree's nodes' values.
- #11easyfoundational
11. Same Tree
Check if two binary trees are structurally identical with same node values.
- #12easyfoundational
12. Symmetric Tree
Determine if a binary tree is a mirror of itself around its center.
- #13easyfoundational
13. Maximum Depth of Binary Tree
Return the maximum depth from root to any leaf in a binary tree.
- #14easyfoundational
14. Balanced Binary Tree
Determine if a binary tree is height-balanced.
- #15easyfoundational
15. Minimum Depth of Binary Tree
Find the depth of the shallowest leaf in a binary tree.
- #16easyfoundational
16. Pascal's Triangle
Generate the first numRows of Pascal's triangle.
- #17easyfoundational
17. Best Time to Buy and Sell Stock
Maximize profit from one buy and one sell of a stock given daily prices.
- #18easyfoundational
18. Valid Palindrome
Check if a string is a palindrome considering only alphanumeric characters.