Two Pointer Problems Interviewbit Sql