Two Pointer Approach Leetcode Problems Sql