Uber | SSE | Round 1
Anonymous User
2356

Round 1:

CodeSignal Interview of 1 hour with lot of requirements

Question along the lines

You have a Log File in format

	TimeStamp   Name   City
	t1    John     Seattle
	t2     Doe      Singapore
	t3    John     Delhi
	t4    Doe       Beijing
	t2   John       Beijing
	t1    Doe       Delhi
	t4   John       Singapore
	t3   Doe         Delhi

These 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.

Comments (8)