i ' th ▁ iteration ▁ computes ▁ ▁ sum ▁ of ▁ arr [ 0 . . i ] ▁ under ▁ ▁ modulo ▁ 2 ▁ and ▁ increments ▁ ▁ even / odd ▁ count ▁ according ▁ ▁ to ▁ sum ' s value
for ( $ i = 0 ; $ i <= $ n - 1 ; $ i ++ ) {