Infosys interview question

understanding data structure and algorithms