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.
Recursion seems to be one of the solutions, once you have a blueprint
I second this, or just freaking array would make more sense. The problem says to return a [x, y], I shouldn't have to poke through the test cases to figure it wants an vector with 2 entries.
This comment is hidden because it contains spoiler information about the solution
Thanks man, its working now
You are probably getting tabs and spaces somehow mixed up in your solution. The problem is not related to sorting.
Check in your IDE if you use spaces and tabs for indentation consistently. Initial solution does indeed use both (and it's not good), but you have to be really unlucky to get bitten by it in such small stub :)
In python when I'm trying to sort I getting this. I don't understand why.
Thanks.
@hobovsky: thanks!
Fixed.
This test is correct, and other tests also seem to be correct, but I think you could mix up tests cases which you failed. Please see here to confirm: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail
If you are sure you are failing exactly this test, you can share your code so we can take a look.
Then one of the built in test is borked I think.
Yes, that's correct.
This comment is hidden because it contains spoiler information about the solution
Makes sense, cause :: means its in the scope of my Same class?
I c++ well enough and I have no idea how these tests work in back end so I know better than waiste my time trying to figure that out.
Like that sample test file doesn't run on its own does it?
But anyway, thanks!
Kata works OK, but it seems g964 broke initial solution stub when fixing the C++ version of the kata recently. It's not something what would stop you from solving the kata, but you have to be familiar with C++ a bit to know what's wrong. I believe g964 will fix it soon, but until then you can use this code as starting point:
Paste this code into "Solution" panel and fill in the method
comp
with your implementation.main.cpp:7:1: error: expected unqualified-id
public :
^
main.cpp:18:16: error: use of undeclared identifier 'Same'
bool ans = Same::comp(a, b);
^
2 errors generated.
C++, this doesn't seem to work at all? At first because I am a C++ nub I thought I was having an overflow or something but this happens if you don't touch the code so surely its an error on Codewars side?