Uber Data Scientist Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Implement weighted sampling without replacement
Implement in Python a function sample_k(items, weights, k) that returns k items without replacement with probability proportional to weight. Requireme...
Design airport dispatch with ETA uncertainty
You control airport pickups with streaming ETAs for arriving flights and live driver locations/queues. Design an online dispatch algorithm that minimi...
Implement sqrt with Newton vs binary search
Implement numerically robust square-root routines and analyze convergence Task 1 — sqrt_newton(x, tol=1e-12) Implement a Python function that returns ...
Check anagrams under real-world constraints
Given two strings s and t, determine whether they contain exactly the same multiset of characters (e.g., 'abc' and 'cab' → true; 'aab' and 'ab' → fals...
Compute maximum concurrent trips from intervals
You’re given n trip intervals [start, end) in seconds, where start < end, representing when a rider’s trip starts and ends in a city on a specific day...