Applied Intuition interview question

The question was based on data structure and algorithm