Amazon interview question

tictactoc heap binary search related