Infosys interview question

Basic java and data structures