Capital One Interview Question

Subarray from given int array