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 comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
s
is the input array converted to set for efficiency. The return line does exactly what the specifications say:x
for whichx + 2
exists in the input array{x, x + 2}
If you need an explanation about how the used classes/methods work, you can look up the documentation yourself instead of discussing spoilers here.