PayPal Interview Question

One array was given and we need to find maximum subarray length such that given condition is satisfied.