Meta·Software Engineer·Technical Phone Screen
- Given a dictionary mapping city names to their populations, implement a random generator function that returns a city name with probability proportional to its population.
“I knew the general idea (prefix sums plus binary search) but fumbled the implementation details under pressure.”