Pergunta de entrevista da empresa DXC Technology

A leetcode easy question on two pointers.