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.
Yep, this solution does not take into account that the killer should have seen all the dead people that day. So the tests are written incorrectly. And the spread operator in this context is just an overcode, you can write dead[0] and the solution will still pass the tests.
I see, if the example in the description would have Johnny as the first value, it would fail.
You're right. The problem is in
includes(...dead)
, which only checks the first name in thedead
list. The current test cases likely miss this bug and should be updated.Because it works, why do you say it shouldn't?
This solution should not work for this problem, I don't understand why it is among the correct solutions.