Ad
  • Custom User Avatar

    The constraints were meant to limit the space complexity to constant which is definitely useful in memory-constrained platforms such as embeded systems or even in a large scale data streaming application which can't store everything in the memory.

  • Custom User Avatar

    Either your algorithm is inefficient (I haven't done Ruby version but I assume that it requires a linear solution), or you're running into an infinite loop.

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    I think I got it! Im passing 85% of the test cases so thats a great sign, just had to keep in mind that the function is an object itself ; )

  • Custom User Avatar

    Just don't get into the infinite loop (it's not really mathematic as well).

    You can solve this very easily if you pay close attention... Now it's your turn to think ;)

  • Custom User Avatar

    Can someone point me along the right way? Im thinking to practice recursion on this one but how do I handle the infinite loop with JS? Im beginning to think that the solution is more mathematic than programmatic.

  • Custom User Avatar

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

  • Custom User Avatar

    Great Kata! Very much enjoyed this puzzle :)

  • Custom User Avatar

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

  • Custom User Avatar

    Is a 6 level kata expected to test our knowledge of how different environments implement a certain method via differing algorithms? If so then it is my misunderstanding. I feel like the idea is write a code that works and makes sense, not that gets at the root of how different engines implement the sort function, for example. I by no means want anyone to do my work, how will I learn? I wrote a code that I see works on my repl.it environment, so as a student I think Ive done my work, because if I go back to the directions, they dont make my confusion any clearer.

  • Custom User Avatar

    The second basic test and it seems all the random cases. Just whent through 5 failed random tests just to check my code and the all passed in repl.it.

  • Custom User Avatar

    I am having alot of problems with the JS version as well. My code returns all the right results in my repl.it, however for the same code and same test cases on Codewars it does not return the right answer.

  • Custom User Avatar

    Is there a way for me to see your comment? I still cant figure out what Im doing wrong :/.

    *** Edit now I can see them.

  • Custom User Avatar

    If you keep mentioning "is this a newb thing" twice in one comment perhaps you should just admit that you're a newbie and you're probably not qualified to give strong opinions about this.

    (Yes, I'm talking about those "this is clever but not best practice" comments, they've since long become passive-aggressive assertions about "code that is short and does the task but I don't like it so I have to diss it".)

    Also, this is JS, not C or Java or anything. Their syntax look similar but they're very different.

  • Loading more items...