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.
What is the problem with modifying the inital array? For all intents and purposes your original array should be destroyed when using this I believe.
I must admit that I only care about that when it's part of the description/tests.
Here's the same solution, but this version doesn't modify the original array:
https://www.codewars.com/kata/reviews/5514e5bcdbc294a0d50003fe/groups/5c5dc840d40a5d00016acdf8
This solution has a side effect of modifying the initial array when num isn't something like { 9, 9, 9, 9, ..., 9 }
Won't work for a = {2, 5} and b = {9 , 16}