Uber L4 Software Engineer Interview Experience Accepted
Question Details
Candidate Profile
Experience: 5.5 Years
Company: Uber
**
Round 1 Screening** *
Problem: Find the Closest Palindrome (LeetCode Hard). *
Verdict: Yes **
Round 2 Data Structures & Alg
Full Details
Candidate Profile
Experience: 5.5 Years
Company: Uber
**
Round 1 Screening** *
Problem: Find the Closest Palindrome (LeetCode Hard). *
Verdict: Yes
**
Round 2 Data Structures & Algorithms** *
Problem: Given a grid containing police stations, one thief, and one bank, determine if a path exists for the thief to reach the bank without being caught. Each police station patrols within a fixed Manhattan distance ($k$). *
Solution: Implemented Multi-source BFS to mark danger zones defined by police patrols, followed by DFS to validate the thief's path. *
Follow-up: Solve for a scenario where the patrol distance ($k$) varies for each police station. *
Follow-up Solution: Implemented Dijkstra’s algorithm. *
Verdict: Strong Hire
**
Round 3 Low-Level Design (LLD)** *
Problem: Design a data structure with Time-to-Live (TTL) functionality for (key, timestamp) pairs arriving in increasing order. Required features include: 1. Count of all active keys. 2. Count of active keys for a specific key. 3. Standard CRUD operations. *
Candidate Approach: Used a Map<String, Queue<Timestamp>>. Expired keys were removed by iterating through the map during function calls. *
Optimized Approach (Suggested by Interviewer): Use a Queue<Pair<Timestamp, Key>> for expiration management, coupled with a Map<String, Integer> for specific key counts and a global variable for the total count. This allows directly polling expired elements from the queue based on timestamp without iterating through map keys, resulting in better average-case complexity. *
Verdict: Lean Hire
**
Round 4 High-Level Design (HLD)** *
Problem: Design a recommendation system for the Amazon homepage. *
Solution: Modeled as a Top-K problem. Utilized Flink to track metrics (item views, purchase counts) and maintained sorted sets to generate real-time recommendations. *
Feedback & Challenges: * Scale estimations were imprecise. * Metric selection was limited (focused primarily on views, buys, and ratings). * Failed to account for localization (e.g., maintaining different datasets for different countries). * The architecture used separate Redis caches for different metrics, limiting extensibility. *
Verdict: Hire
**
Round 5 Hiring Manager** *
Focus: Behavioral questions regarding past professional experiences and responses to hypothetical workplace scenarios. *
Verdict: Strong Hire
About This Question
This is a reported interview question from a uber interview for a swe role (mid level) during the behavioral round reported in 2025.
It covers the following topics: Graph, Strings, System Design, Queue, Behavioral, Heap, Matrix, Stack .
Difficulty rating: Hard