Domanda di colloquio di IBM

DSA Question based on two pointer