Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Your kind of solution wasn't supposed to work, but at some point Node version got updated, and nothing has been done to combat that. Either enjoy the free points, or try solving it again properly :P
... clever
Unfortunately I cannot test your code right now, but I think there might be a problem with empty vectors. And they don't get printed to console either, so you should check their lengths too.
It happens because random tests for this kata are terrible, and don't cover enough edge cases. You can check which test fails by adding debug statements at the beginning of function (
coutfor C++).In your case, the failing test is
a = [2, 2, 3], b = [4, 9, 9], which should be false (because there's only one4and two2s, and only one3for two9s), but your code returns true.Correct.
lower is never freed.
Oh okay, that's totally up to you. I just wanted to submit my crappy solution to see the actual solutions :D
I was contemplating whether I wanted to keep this kata or not. Apologies
Why is it in draft again?
I don't think the code matters here. Sample tests don't test for anything, and whatever is happening in attempt, is completely broken. It looks like someone, somehow approved a broken translation.
Now it is
This part isn't tested.
I don't think you're suppose to make it like this
This is the way
wrong solution for small n
Loading more items...