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.
As the array is never empty, a cool hack is to initialise 'small' with int.MaxValue
So you don't have to read twice the first value of 'args'. Your solution becomes compliant to more collection's types
code litery like
here is an extera iteration of the loop
Good work! Wasn't aware of "foreach", will definitely be using this from now on when convenient.
My solution was almost identical. not the shortest of the posted results but functional .
"You can assume, for the purpose of this kata, that the supplied array will not be empty."
From the description.
if args is null or empty this will throw a null reference exception or index out of bounds respectively