Ad
  • Custom User Avatar

    Made mine similar way, but could someone explain me, why don't we need to check after line 4 if sum == 0?
    I mean on line 6: for example, sum from arr{1, -1, 5, -5} == 0, so
    cSum(is 0) != sum(is 0) - arr[0](is 1).
    How will it return 0?