Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
1 is what your function wrongly returned, not the input value.
Closing.
It's the minimum from the previous step. It shows a continuity, what we might call an 'induction hypothesis'. If min was the minimum from the previous step, and we take the minimum between that and the number we are currently looking at, we know that what we return is the minimum over all (so far), right? So we know we will end up with the minimum of all the numbers once we're done.
But I accept your criticism about the naming.
prevMin
would have been clearer.Honestly I'm more upset about the
initial
, though.available
is so much better.Because you have an infinite loop under certain conditions. Print the input.