Since the ordering seems to be correct, I assume, that you have one white space character causing this problem.
Assert usually does a string compare. If the actual string has one space too much, becuase you were simply adding 'number + " "' each time, the result seems like yours, but contains the whitespace, which is not shown.
Issue is closed, read above comment
WOOOOSH
Let me rephrase it, then: Besides, C++ is just C, but with classes, isn't it? BIG WINK EMOJI ;););)
Duplicate of a suggestion raised already 2 years ago. Author explicitly stated that they want the function signature this way.
Besides, C++ is just C, but with classes, isn't it?
Ainur try to run your solution on this test:
Correct answer is
0
(List(5, 5)
,List(3, 3, 4)
)Your algo says:
2
Since the ordering seems to be correct, I assume, that you have one white space character causing this problem.
Assert usually does a string compare. If the actual string has one space too much, becuase you were simply adding 'number + " "' each time, the result seems like yours, but contains the whitespace, which is not shown.
You can see at the top of the page how many people passed the C+ kata.
In your expected answer, there is "equal to " that is not present in your actual answer.
Maybe the expected answer in this particular test case is different than the others test case?