Two Pointers Question On Leetcode Rating