Maximize the number of subarrays

Problem Name:
Maximize the number of subarrays
Site:HackerEarth
Links:
Tags: