Two Pointer Approach Leetcode Rating System