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 is not surprising and that's exactly the problem with undefined behavior in C/C++ ... many things can happen depending on the platform, the way the code is run, the compiler, etc. the worst case scenario is when nothing special happens, until that one day when a cryptic bug pops up from nowhere. there are some tools that can help, such as static analyzers. when i ran your code in this one, it correctly detected UB when run with an empty string (warning, this analyzer is free and online but it's a bit slow and the UB diagnostics can be a bit cryptic if you're not well versed on low-level details)
In Python everything seems to be +1-3 kyu easier, while half as fast.
This comment is hidden because it contains spoiler information about the solution
please don't open issues to ask for help, ask a question instead, unless you can prove that the problem comes from the test suite and not your code. there is some info about this error message in the Codewars docs
try your code with an empty string
This comment is hidden because it contains spoiler information about the solution
the real Clever is removing the const keyword from the arguments
I assumed the solution page is only visible if you solved the kata?
Please mark your post as having spoiler content next time, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
Hmm, assumed there would be another property besides gcd.
Would be cool if they put execution times next to each solution on this website.
Idk if it is runtime efficient to transpose + reverse the remaining matrix every loop. But people prefer short code to efficiency.
since
transitions
is constant should have labeled it in captials for BPforgot to remove 2nd + 3rd line
Dont worry about it. Being stuck seemingly indefinitely happens. When I am stuck like that, I usually pull myself down as well, even tough I know that my best course of action should be getting the problem out of my mind for now, do some other katas or do something entirely else until my mind has relaxed again.
A tense mind limits your creativity extremely, which makes one only more tense. Its a vicioius cycle.
Loading more items...