Uber | SSE | Round 1
Company: Uber
Role: senior software engineer, staff software engineer
Interview Stage: Round 1
Original Post Content:
Round 1:
CodeSignal Interview of 1 hour with lot of requirements
Question along the lines
You have a Log File in format
1 TimeStamp Name City
2 t1 John Seattle
3 t2 Doe Singapore
4 t3 John Delhi
5 t4 Doe Beijing
6 t2 John Beijing
7 t1 Doe Delhi
8 t4 John Singapore
9 t3 Doe DelhiThese are log of user and there location in a particular timestamp ( Long Format ) Order is non sorted.
Create Sequential combination of cities for 3 consecutive timestamps (t1, t2, t3). (t2,t3,t4) etc with count of users appearing in those cities accordingly.
e.g for t1, t2, t3
John is in -> Seattle Beijing Delhi
Doe is in -> Beijing Singapore Delhi
for t2, t3, t4
John is in Beijing Delhi Singapore
Doe is in Singapre Delhi Beijing
So the out put would be
( Seattle , Beijing , Delhi ) - 1
( Beijing Singapore Delhi ) - 1
(Beijing Delhi Singapore) - 1
(Singapre Delhi Beijing) - 1
and so on.
No limit in number of users or cities or timestamp. In Memory solution can be discussed, how would you scale it from millions of logs.
Completely bombed it.