Ad
  • Custom User Avatar

    I believe the variable r can be quiet large and will take over 6000ms to complete when r is large for multiple tests. So in other words, your solution isn't efficient enough to complete this kata in the required time boundaries. You may want to rethink your stratergy.

  • Custom User Avatar

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

  • Custom User Avatar

    you have an infinite loop somewhere. You need to recheck your code and make sure there are no loops, this isnt an issue with the kata and should therefore resolve the issue. :)

  • Custom User Avatar

    My code doesn't pass test 4, 7, 8, 9, 11, 12, 13, 14. The first error is: "Expected: Leonard, instead got: Penny". This seem to happen due to the names array input stacking up all the names as a global variable. I then tried to declare a copy of it to a new variable, and refer to that copy while running my function. Same problem persist. Finally - I made a raw copy of the names array and put it in my code. It now passes all the tests, but instead I'm getting an error saying "Process was terminated. It took longer than 6000ms to complete". Can someone please help me explain what's going on?

    I'm using JavaScript.

    Thanks in advance!