Array Based Leetcode Problems Sql