LTIMindtree Interview Question

Simple its not much complex