The interview was so easy. i got these questions
Round 1:
- Havining stream of data find the max number in buffer size of k
ex stream {1,2,3,4,3,2,7} , k=3
1-> {1} max= 1
2-> {1,2} max= 2
3-> {1,2,3} max= 3
4-> {2,3,4} max= 4
3-> {3,4,3} max= 4
2-> {4,3,2} max= 4
7-> {3,2,7} max= 7
Solved using Queue + TreeSet
complexity O(N logk)
Round 2:
Round 3:
Round 4: [System desgin]
- Desgin video renting system
I have no idea why reject.