When no value is passed to reduce(), like ([]), where the initial value is 0. The reduce returns it's initial value.
reduce()
[]
thank you.
if a is longer than b, b is a, a is b
it means if no lost number return 0
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
When no value is passed to
reduce()
, like ([]
), where the initial value is 0. The reduce returns it's initial value.thank you.
if a is longer than b,
b is a, a is b
it means if no lost number return 0
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution