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 comparison function does not account for integer over/under flow ;-) that's the point of these fixed tests
They're not, the description was awkwardly worded. If the input cannot be arranged into a square, it is invalid and you have to return
"No"
You should provide an example...
Here's one:
Same for
[1, 1]
If it's a problem with your algo, please mark as a
question
, not anissue
. EmperorMigx is correct, you have to allocate memory and mind your type.You're not doing that. Read the description again.
Hi, there's no
issue
here. You're adding up all5
letters in the input 'cCdvi' wherecCdvi > 5 + 10 + 9 = 24
, meanwhile 'd' and 'v' are not in the word 'sabbatical', so they should not be counted.What language you're using? if C then you should mind the return type.
In this case the return type is size_t
Use calloc bro this was my error too. I'm using C.
BTW if you see this, would you not mind if you already finished g964 Kata's the:
Rectangle into Squares and Backwards Read Primes
I believe I know how to solve it but I don't know how to return the value. I've rewritten it without using typedef struct and I manage to have correct answers. But in the format typedef struct in those katas I'm getting error: Caught unexpected signal: 6
It's at least 32 bits.
Which implies that
unsigned long
has this size on this platform.I've just checked, everything works. Check your solution.