Infosys Interview Question

they gave me dsa question straight forward