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.
I just completed the kata using the same technique and it worked for me. If your solution crashes, it's probably caused by some other issue, and not by the way how your result matrix is allocated.
This comment is hidden because it contains spoiler information about the solution
I see two problems :
1- Check upper bound of for loops
2- str1 does not exists outside of char* solve(), one way to solve might be to allocate some memory and return a pointer to that.
Please also read :
https://github.com/Codewars/codewars.com/wiki/Markdown-Formatting
This comment is hidden because it contains spoiler information about the solution
Yes, you was right. Problem with logic, thanks, improved it and passed the test :>
Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#print-input
About your code, the logic is wrong, you're running out of the smallest bills when you can avoid that.
This comment is hidden because it contains spoiler information about the solution
The test is ok.
yeah, sorry, you're right..
i'm an idiot, lol
thanks
This comment is hidden because it contains spoiler information about the solution
int largest_five_digits(char *digits)
{
int length = sizeof(digits) + 2;
int gDigits[length], i;
int max = 0, maxI, maxDigit[5];
for(i = 0; i < length; i++)
{
gDigits[i] = digits[i];
}
for(i = 0; i < length - 4; i++)
{
if(gDigits[i] > max)
{
max = gDigits[i];
maxI = i;
}
}
for(i = 0; i < length - 4; i++)
{
maxDigit[i] = gDigits[maxI + i];
}
return maxDigit; // you code here
}
Sorry for this kind of question!
I find the solution, but i can't return it.
the upper & lower different is 32=0010 0000
'A' ^ 'a' wanna get this value
c|= 0010 0000 will let upper trans to lower
that's why next line only compare the lower vowel.
This comment is hidden because it contains spoiler information about the solution
when i tested my code i had got following error. Why?
solution.c:1:1: error: unknown type name 'y_'
y_
^
In file included from solution.c:2:
In file included from /usr/lib/llvm-8/lib/clang/8.0.1/include/stdint.h:61:
In file included from /usr/include/stdint.h:27:
/usr/include/x86_64-linux-gnu/bits/types.h:30:1: error: expected identifier or '('
typedef unsigned char __u_char;
^
2 errors generated.
no idea either
Loading more items...