UBS interview question

Basics of Data Structure