Two Pointer Technique Problems Leetcode Sql