Domanda di colloquio di Walmart Global Tech

Two pointer problem based on array