Round 1: Coding and Problem Solving( 60 mins)
This round was taken by an external agency named Interview Vector. They asked two questions:
Given a website, everytime someone visits a page, the following entry gets logged in one of the Given two user ids(U1 & U2), find the interval when both users were simultaneously in a logged in state on the website.
In above case, servers(consider multiple servers behind elb)
User_id, timestamp, status
For ex,
U1, 12:20am, logged_in
U2, 12:40am, logged_in
U1, 01:40pm, logged_out
U1, 04:00pm, logged_in
U2, 05:00pm, logged_out
OUTPUT:
12:40am - 1:40pm
04:00pm - 05:00pm
Need to solve both the questions within the given time and all the edge cases should be passed.