Ad
  • Custom User Avatar

    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!

  • Custom User Avatar

    I don't understand this at all, won't it always just return true?

  • Custom User Avatar

    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.

  • Custom User Avatar

    How did you compress the string?

  • Custom User Avatar

    On further thoughts, maybe the codewars servers are just struggling to update quick enough. Along side the horde's of coders using codewars.

  • Custom User Avatar

    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?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution