Ad
  • Custom User Avatar

    Hey there, sorry it took so long to get back to you. Your issue is that you are editing the variable n. The random tests are then taking your solution's n and running it back through the algorithm. Instead of doing this, try duplicating n to some other variable and your solution should work fine. You will have issues with many other solutions if you continue editing the variable passed to you, so I would recommend never doing it.

  • Custom User Avatar

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

  • Custom User Avatar

    If you wouldn't mind, could you post your solution here with spoiler tags? I would like to see what you are seeing with the random tests.

  • Custom User Avatar

    Slightly modified, thanks!

  • Custom User Avatar

    The Submit tests for Ruby require different instructions than the test cases. The test cases correctly use the last digit as the first digit in the final result, but in the submit tests, the first digit is retained.

    For example:
    Even when I pass the manual tests, in the final test, what should be correct is marked wrong.

    reverse_fun("3yrpm2qgku8fmcr7zadt7qwku4qecs")
    Expected: "3sycrepqm42uqkgwkqu78tfdmaczr7", instead got: "s3cyerqp4mu2kqwgqk7ut8dfamzc7r"

  • Custom User Avatar

    In the second example in the instructions, I believe 0 and 25 need to be included. This can be confusing.

  • Custom User Avatar

    Hi. Can you explain to me what this does?

  • Custom User Avatar

    Try to avoid sorting.

  • Custom User Avatar

    I have a working solution, but it takes too long on the final submit. Any tips to point me in the right direction? Not sure how much more I can elaborate because I don't want to spoil.