Generate All Subarrays Leetcode 150 Problems With Preservision