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.
But in O notation it will be 3x vs x² i think this is still better than having nested maps or foreach.
This kata definition should add an additional restriction for not using built-in language functions ? for example for php there is a array_diff function. Idk if this restriction is more oriented to the spirit of the kata.
Technicaly, the requirement didnt say EXPLICITLY that we could not use built-in function so there is a gray area. So despite this aproach is not "handmade from scracth" is also valid acording the kata definition.