2K interview question

Assessing my knowledge of data structures and algorithms