Screening (LLD)
Round1: DS/Algo
5 4 5 7 3# you've been given list of (height h, num. of people standing in front that had height >= h):
5 0 # 0=[] since no one standing in front
4 1 # 1=[5]
5 1 # 1=[5]
7 0 # 0=[] since no one >=7
3 4 # 4=[5,4,5,7]# after sorting:
5 0
7 0
4 1
5 1
3 4
# doubly linked list with each iteration:
[(5,0)]
[(5,0) (7,0)]
[(5,0) (4,1) (7,0)] # since in (4, 1), there's one element >= 4 in front of 4
[(5,0) (4,1) (5,1) (7,0)] # since in (5,1), there's one element >= 5 AND you CANNOT place it before (4,1) because (4,1) can only have one element >=4 in front of it
[(5,0) (4,1) (5,1), (7,0) (3,4)] Round2: HLD
Round3: Hiring Manager