Medium Expedia Interview Questions: Strategy Guide
How to tackle 35 medium difficulty questions from Expedia — patterns, time targets, and practice tips.
Medium questions at Expedia typically assess a candidate's ability to implement core algorithms, manipulate data structures, and apply logical reasoning to problems that are one step beyond foundational concepts. They often involve combining multiple ideas, such as traversing a graph while tracking state or applying a known algorithm with a custom twist. Success here demonstrates you can handle the complexity of real-world software development.
Common Patterns
Expedia's Medium questions frequently test a few key areas. Recognizing these patterns is crucial for efficient problem-solving.
Graph Traversal (BFS/DFS): Problems often involve navigating relationships, like flight routes or dependencies. You'll need to modify standard traversal to track paths, levels, or specific conditions.
# BFS for shortest path in unweighted graph
from collections import deque
def bfs_shortest_path(graph, start, end):
queue = deque([(start, [start])])
visited = set([start])
while queue:
node, path = queue.popleft()
if node == end:
return path
for neighbor in graph[node]:
if neighbor not in visited:
visited.add(neighbor)
queue.append((neighbor, path + [neighbor]))
return []
Dynamic Programming: Expect problems involving optimization over sequences or states, such as maximizing value under constraints or counting ways to achieve a result. Identifying the subproblem and state definition is key.
String Manipulation & Hashing: Questions may require efficient substring searches, palindrome checks, or anagram grouping using hash maps for O(1) lookups.
Tree Operations: Beyond simple traversal, you might need to validate BST properties, find lowest common ancestors, or serialize/deserialize tree structures.
Time Targets
In a 45-60 minute interview slot, you should aim to solve a Medium problem within 25-30 minutes. This timeline includes:
- First 5 minutes: Understand the problem, ask clarifying questions, and discuss edge cases.
- Next 10 minutes: Explain your approach, including time/space complexity, and get interviewer buy-in.
- Next 10-12 minutes: Write clean, syntactically correct code in your chosen language.
- Final 3-5 minutes: Walk through a test case and discuss potential optimizations.
Practice under this constraint to build the necessary speed and clarity.
Practice Strategy
Don't just solve problems; simulate interview conditions. For each Expedia Medium question:
- Timebox your attempt: Set a 25-minute timer.
- Verbally articulate your thought process: Explain your reasoning out loud as if an interviewer is present.
- Write production-ready code: Include clear variable names and handle edge cases.
- Analyze your solution: After solving, review the optimal solution. Note any gaps in your approach or knowledge.
- Categorize by pattern: Tag each problem you practice (e.g., "BFS", "DP"). This helps you recognize patterns faster during the actual interview.
Focus on depth over breadth. Mastering 15-20 problems across the common patterns is more effective than superficially attempting all 35.