Rothesay interview question

Data structure, algo, big O