Capgemini interview question

the question was on basic and medium level dsa