DIVISIBLE SUBARRAY VIDEO

WHY WE TOOK ARRAY OF SIZE 6 OF CUMULATIVE ARRAY WHEN WE HAVE SIZE OF ARRAY AS 5

Hey Rupesh, cumulative array is a prefix sum array, it starts with 0 as when no element is there sum is 0. Hence we take cumulative sum array of 1 extra size

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.