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.
My JavaScript solution has a time complexity of 2 * O(n log n), so effectively O(n log n). On my laptop it's finishing 100000 element arrays in around 118ms when reporting it with console.time. I am getting through around 70 large tests at this time complexity, should O(n log n) be a passing solution?
Update
I refactored my solution and brought down the time complexity down to just a single O (n log n) algorithm.
I cannot express enough how satifying it feels to finally complete this. This challenge provoked me to take an online course on data structures and algorithms. I have learned so much since I first attempted this challenge and stuck with it until I learned the proper data structure needed to complete it.
In the end I was clocking around 12ms for a 100000 element array on my local machine. Tho the real accomplishment was what I learned in the journey to get there.
Cheers and thanks for a great challenge!
I don't understand this at all, won't it always just return true?
So i've solved this kata and learned a lot in the process. However the solutions have been withheld and it's saying I have not solved it.
How did you compress the string?
On further thoughts, maybe the codewars servers are just struggling to update quick enough. Along side the horde's of coders using codewars.
So I've solve the Kata! However on submit I was sent to blocked solutions page. I'm wondering whats gone wrong here. Quite possible my solution just sucked horribly and did not deserve the on honor of seeing the solutions. Or is this a bug?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution