Subarray Problems On Leetcode Sql