3 ms·
map/reduce deals specifically with an array whereas a while doesn’t? Most people get traversing an array with a for/while loop vs traversing with map, but using
by ericmcer 7y ago
map/reduce deals specifically with an array whereas a while doesn’t? Most people get traversing an array with a for/while loop vs traversing with map, but using a while loop in a more algorithmic question trips people up.
Let’s say my terminating case is that a number no longer has a remainder when divided by X, that confuses people, different from terminating at the end of the array.