Ad
  • Default User Avatar

    No problem - I'm sorry that you don't get to earn points for this kata, I hope you liked working on it though!

  • Default User Avatar

    Thanks for attempting this again, but I unpublished it as the mods found it was a duplicate of another kata.

    Still, just to help you out - your code is still wrong you are reading the error messages incorrectly.

    When you see, in Console output:

    Returned solution list is not valid for input value of n = 11

    that message is applying to the input ABOVE it, not below.

    When you run your code, you can see then a part which says:

    Log

    12

    [3,4,5]

    Test Passed

    That means your code DOES work for the input n = 12, and is returning [3,4,5] which is a correct answer.

    As I mentioned earlier, your code is failing for the input n = 11 still; you can see this in your IDE - when you run the code with input n = 11 it returns an empty list when there is in fact a valid solution which your code is not finding.

  • Default User Avatar

    Ah nope, that's an error with your code I'm afraid - I copied your solution and tested it; with the input value of n = 11 your code is returning an empty list when there is in fact a valid solution [5,6]