Why does we consider taking 0 as a subarray

Why can’t we ignore it and just start with the first element

yes
the remainder can be from 0 to n-1
but we have n+1 different elements
so one should definitely same after taking mod with n

but peigon hole principle me to holes kum hote he aur elements jyada right?

yeah sorry it was done by mistake

acha okay . Jab me csum%n krta hu to remainder 0 bhi aa sakta he and if don’t take null subarray to meri number of possibilities kum ho jaengi right?

yes
the remainder can be from 0 to n-1
but we have n+1 different elements
so one should definitely same after taking mod with n

like array is 1 2 2 6 4.
then cumulative array will be- 1 3 5 11 15
so if i do csum%n…then my new array will be- 1 3 0 1 0
so agar me null subarray nhi leta to ans inspite of 3c2 will be 2c2 right?

yes it is correct

if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course