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.
Testing for [2, 1, 3] and [18, 1, 2]
expected true to equal false
???
I managed to make it work but tests are too strict on CodeWars side.
It works on server to like n = 3850 and then timeout is shown.
Strangely, on my old laptop for n = 4000 it takes around 4.5 secs.
Great kata, but it's another one on the site where testing won't pass it, despite working ok on my old local notebook.
CODEWARS - maybe it's time to pump up your server? :D
This comment is hidden because it contains spoiler information about the solution