Two Pointer Approach Leetcode Rating Chart