Bizongo interview question

Two pointer based leetcode question.