Insider interview question

Please solve this Data Structure and Algorithms test so that we know you qualify