Infosys interview question

Simple aptitude questions, Few algorithms