Added types and replaced a class with static method wrapper with a function. This will invalidate existing solutions, but it's better than continuing to force unidiomatic solution.
Please, remove O(n^2) reference solution in Python and Ruby (at least). If you want to test the time complexity, increase the input range, but don't waste 85-90% of the allowed time to "take it away" from the user.
This comment is hidden because it contains spoiler information about the solution
If I correctly understand you, I should have the same number of random tests in all languages?
@kazk: Thanks!
Because the description literally says "try to avoid nested loops"?
And if you decide to remove the "performance requirement", then you'll have to update languages which time out with
O(n^2)
solutions like PHP.Added types and replaced a class with static method wrapper with a function. This will invalidate existing solutions, but it's better than continuing to force unidiomatic solution.
If anyone is interested in helping to improve TypeScript support, see the list of TypeScript kata to update.
To update to 3.3 the kata has to be re-written... Feel free to update it...since you seem to have enough time:-)
Why do you want performance requirements?
Done.
TypeScript 3.3 fails because types are not specified for variables in the fixture.
There're no performance requirements in C, JavaScript, CoffeeScript, C++, C#, Go, Java, TypeScript (at least) at all.
Re-raised as a more meaningful issue.
Also, it turns out that you can pass the JavaScript tests with a
O(n^2)
solution, so the issue is definitely on your side.Please, remove
O(n^2)
reference solution in Python and Ruby (at least). If you want to test the time complexity, increase the input range, but don't waste 85-90% of the allowed time to "take it away" from the user.post your code with a spoiler flag, plz.
This comment is hidden because it contains spoiler information about the solution