Happay interview question

Algorithms, Data Structures