DXC Technology Interview Question

A leetcode easy question on two pointers.