Capital One interview question

Subarray from given int array