Ad
  • Custom User Avatar

    ruby should be updated to version 3

  • Custom User Avatar

    Absolutely no need giving an array as input. Integer n would suffice.

  • Custom User Avatar

    A little too late, but because join returns a string, it doesn't transform the array to a string.

  • Custom User Avatar

    For each language:

    • C# - This has 100 random tests, so that one is alright already.
    • JavaScript - This only had five random tests, so I've increased it to 100.
    • Ruby - This has no random tests, but an issue has been raised for that.
  • Custom User Avatar

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

  • Custom User Avatar

    Nice kata, thx!

  • Custom User Avatar

    The Ruby version of this Kata has no random testing whatsoever and as such can be passed by returning a constant string. No other language versions suffer from this issue.

  • Default User Avatar

    I'm sorry, I should have been more clear.

    First, let me say that I am commenting on the Ruby translation. The JS translation does not seem to have this issue, as the description specifies the numbers you receive will vary ("1 through 10 or less").

    The issue is not that the input does not change; the issue is that, for all stated possible input values, the return value of the function will be the same.

    In languages other than JS, you will receive the same 10 numbers in an array every time. Sorting these different inputs will always result in the same array. This means that the solution will ALWAYS be to simply return the following string:
    "10 9 8 7 6 5 4 3 2 1 liftoff!"

    Thus, a valid solution can safely ignore the input parameter. Having the parameter be there at all seems intentionally misleading.

    If the other translations worked the same as a JS solution, where the given numbers were not always 1 through 10, this would not be an issue.

  • Custom User Avatar

    use console.log(input) to see the inputs and you will notice they are randomly generated :)

  • Default User Avatar

    How does it vary based on input? What input could you give to the function that would return a different string?

  • Custom User Avatar

    resolved

  • Custom User Avatar

    That should be suggestion not issue.

  • Custom User Avatar

    resolved

  • Custom User Avatar

    That should be a question, not an issue.

  • Custom User Avatar

    That should be a question , not an issue.

  • Loading more items...