Ad
  • Custom User Avatar

    This would be a different kata, it's hard do it well, and probably nearly impossible to do in several languages. This is an old kata that has been solved about 100k times, it is not going to be changed now.

    Edit (I realize I misread you)

    Suggestions of challenges that are not enforced don't make much sense; several have been removed in some old katas, with reason, IMO. So, no. If someone wants to challenge himself, he's still free to do it.

  • Custom User Avatar

    The point is, that description will never be able to cover all possibilities solvers could ever come up with. There has to be some point after which solutions will be considered so bad they are not worth explaining. For example, one day a user comes and complains "I added thread.sleep(100) into my solution to make debugging easier, and it works on my machine and times out on Codewars. You need to tell what n can be so I know how long my threads can sleep."

    Now the question would be: is a recursive solution bad enough to make it fail without any explanation? I would say: I am not sure, but I think it's not. Some would say that if you are going to use recursion, you should be able to know its advantages and disadvantages and know when (and how) it can fail. On the other hand, this kata is supposed to be 8 kyu, aimed at total beginners, who may not understand many things. Additionally, stating limits of problems is always good thing. I think that waay too many kata do not provide this information, while they really should.

  • Custom User Avatar

    8000 is not a large number (the largest value tested in JS is 10000). The recursive approach is very inefficient in such a case, a function requiring thousands of recursions must be expected to crash due to stack overflow.

  • Custom User Avatar

    That's essentially a whole different question at that point.