LTIMindtree interview question

Simple its not much complex