Wells Fargo interview question

It was a DP question based on finding subarrays.