Ad
  • Default User Avatar

    lol i don't remomber how but it did
    it's any easy problem it seems

  • Default User Avatar

    i and c are quite straightforward though?
    i = index, which has always been a convention
    c = character, which is quite obvious when you look at str(n)

    It isn't as big of a deal as you make it out to be, this is about problem solving, not about following pep8 or any naming conventions.
    If it was a software then I would 100% agree with you.

  • Custom User Avatar

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

  • Default User Avatar
  • Custom User Avatar

    I have the same problem, i pass all the tests but get a SystemStackError

  • Default User Avatar

    seems like it wasn't me but the kata itself afterall hehe

  • Default User Avatar

    Please check your code. If you need help with it, please post it as a Question, not an Issue. The Kata is Ok. Please check how many solutions have passed in JS.

  • Default User Avatar

    Javascript: Basic test in 'TEST' passed, but the same test in 'ATTEMPT' did'nt:

    Test Results:
    Basic tests
    Test Passed: Value deep equals [6, 7]
    Test Passed: Value deep equals [0, 1]
    Test Passed: Value deep equals [0, 1]
    Test Passed: Value deep equals [2, 2]
    Completed in 4ms
    You have passed all of the tests! :)

    =============================================

    Test Results:
    Basic tests
    Test Passed: Value deep equals [6, 7]
    Test Passed: Value deep equals [0, 1]
    Test Passed: Value deep equals [0, 1]
    Test Passed: Value deep equals [2, 2]
    RangeError: Maximum call stack size exceeded
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    at solve
    Completed in 6ms
    Random tests
    Test Passed: Value deep equals [10288292, 9492336]... etc

  • Custom User Avatar

    Try to recreate the problem in our IDE. See here to find out what input causes it to fail, and see if the same input works in your IDE.

  • Custom User Avatar

    Did you return or print the result?

  • Custom User Avatar

    main.cpp:32:1: warning: control may reach end of non-void function [-Wreturn-type]
    }
    ^
    1 warning generated.
    main.cpp:8:21: runtime error: execution reached the end of a value-returning function without returning a value

    How fix it?
    On my pc the test passes the values all correct, here he does not want
    Sorry for my English(

  • Default User Avatar

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

  • Custom User Avatar

    Yep, it's not good enough. There's a little trick you need to figure out to speed up the process, which makes it harder than your average 7kyu, IMO.

  • Custom User Avatar

    You're probably missing some return statements. You might wanna google around to see how to do recursion.

  • Default User Avatar

    .

  • Loading more items...