Subarray Question On Leetcode Sql