WA in all 1 count

I am getting WA in all test cases.
code link: https://ideone.com/GsDALD

@pragyanvarshney
hello pragyan,
consider a case when all element of ur array are zero in that case u will never update ur maxlen and other required variables