Leetcode Two Pointer Approach In Cpp