Generate All Subarrays Leetcode Interview