Domanda di colloquio di Tata Consultancy Services

Two pointers problem with time complexity