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.
This comment is hidden because it contains spoiler information about the solution
This solution does not handle the case where the lost number is the last one, e.g. the missing '4' in
[3,1,2]
.Note that the
acc
variable is leaked to the global scope :(This comment is hidden because it contains spoiler information about the solution
That's a terse implementation, which is nice. One notable characteristic though is that it modifies 'peopleInvited', one of the functions arguments. That would be a side-effect, which makes the 'getAttendees' function less of the functional style.