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.
This type of metaprogramming is definitely more difficult than 4Kyu.
push_back
isO(1)
, but creating ann
xn
matrix will always beO(n^2)
.And there's no point in
e
when you can write1
s directly to the matrix.please share your error exactly as appear in the console please
Is_Rotation_and_Is_Reflection_Tests
just checks the return values ofis_rotation()
andis_reflection()
for each of the 8 possible values; that's all.If you're still stuck, post your code here (with a Spoiler flag) and I'll try to figure out what the problem is.
The translator is GiacomoSorbi. I have corrected. Could you verify and resolved the issue if it is correct?
Please read that again. Not an issue.
Yes logic is in reverse order; actually my second solution comply with the requirement.
https://www.codewars.com/kata/reviews/57dd95952e6ae3f5d0000054/groups/58ceed4169094e26a500198e
You could
return {0, 0};
orreturn pair<long long, long long> {0, 0};
, both works and there are lots of solutions with either one or the other. The other solutions return "answer" where answer has been pre-filled withstd::pair <long long, long long> answer(0, 0);
.Usually the Unit test returns
unsupported type
when there is an error somewhere in your code which is not clear but I have no action on that.In one of the post you are referencing the guy gave his code; I tried it and saw he got
unsupported type
on a test where numbers are2, 10000000,11000000
.Later he found his error...
Print the input to see what happens and be sure there are no errors in the tests otherwise there wouldn't be so many solutions.