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 comment is hidden because it contains spoiler information about the solution
closing as a user error and not an issue within the tests
You are mutating the
array
array because of a buffer overflow. Note thatsizeof
do not return the number of elements in an array but the size in bytes of its operand. So an array of 4int
s will have a size of 16 bytes because eachint
has a size of 4 bytes.Just fix this minor issue and your code pass :)
Random test cases in C have multiple integers with odd count but description says test cases shouldn't
examples:
for array = {7, 1, 7, 75, 75, 1, -11, -11, 7, 7, 75, -11, -11, -11, -11, 7, 7, 7, 1, 1, 75, 7, -11, 75, 75, 1, 75, 75, -11, 75, 1}
expected 1 but got 75
for array = {59, -34, 59, 59, 59, 59, 59, 59, 59, 59, 59, -34, -34, 59, 59, -34, -34, 59, 59, 59, -34, -34, 59, 59, 59, 59, 59, -36, 59}
expected -36 but got 59
Today I learned something new.
This comment is hidden because it contains spoiler information about the solution
Oh, You are right. Didn't noticed the compatibilty. Sorry.
Reading the link you posted: "Browser compatibility: Node 21".
It is not a bug with the kata, you used API which is not available on Codewars.
This comment is hidden because it contains spoiler information about the solution
That's not a valid input value.
What to return in case of [1,1,1,2,2,2]?
Fun kata, I liked it
Reminder it's been half an hour, think of the Roman Empire.
Translation Dart
love it - i've solved it in the most inefficient way possible with 2 different arrays and 3 for loops lol welp i'm still learning
Loading more items...