Ad
  • Custom User Avatar

    This means that either:

    a) your solution has a bug, and is stuck in an endless loop somewhere

    b) there is no bug, but your solution is simply too slow.

    Some katas (like this one) will give very large inputs, so you need to not only get a solution that works, but one that works fast enough.

  • Custom User Avatar

    think i figured out what it is but the solution is not being posted. Gives the error that the Execution time has exeeded

  • Custom User Avatar

    You realize you are free to just print/log the input to console if you want to see it. Whatever you log will show up above the test results.

  • Custom User Avatar

    I meant the input array obviously 👀

  • Custom User Avatar

    Well if you worked out (parts of) the math, you'll realize it's impossible to give you the actual array of an input like 7230702951. Not that it would help you much.
    You can do it on paper, replace the names with "A", "B", "C" etc. and line them up for an input like 30; you might be able to discern a pattern.

  • Custom User Avatar

    That was the problem for me.
    It was hard to figure out because the examples where right the whole time.
    The other test cases just say it has to be another name, but it doesn't show the array its using so i can't debug them well.
    Even pen and paper didn't help me, maybe my brain was just at its end today.

  • Custom User Avatar

    Too few, you mean? ;)

    I think the problem is straight forward. If you have difficulty visualizing it, you can always take out pen&paper and work through some example inputs yourself. In fact you'll have to do this alot to solve many problems.

  • Custom User Avatar

    Too little examples to figure out the math

  • Custom User Avatar

    Really nice solution