Agoda Interview Question

Leetcode question around sorting & 2 pointers