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.
Its not I know i'm adding randoms
I created this one as I did not found what I was looking for elsewhere
When a 1 kuy come into a 7 kyu kata just to say that's 'trivial', it does not benefit anybody either.
Maybe you should just relax ?
Don't hesitate to tell me if the task descrption is unclear, i'll update it
I guess the problem may come this line :
long long** result = (long long**)calloc(row, sizeof(long long));
try to declare result as :
long long (*result)[2] = calloc(row, sizeof(lst[0]));
Very efficient solution, indeed, i'm wondering where are defined the lcmu and gdci functions and if we can use them in other katas ?
C translation just Kumited with random tests ;)
Too bad that the answer was NOT the real maximum result you can make with a b and c using + * and ().
By example, here expression_matter(1,3,1) == 5 // 1+3+1
But the real maximum with tose numbers would be 3*(1+1)=6
This comment is hidden because it contains spoiler information about the solution
$ man 3 qsort
This is a quick sorting algorithm, it would prevent you to write the sort(char*,int) function.
This code is very short that is a good point. Unfortunately it's vulnarable to buffer overflows. The output storage 'buffer' is allocated with a fixed size of 500 bytes, checks have to be done to do not exceed this limit.
Concerning the efficiency, the code :
Could be shorten to :
We save time by not calling strlen function
And the code :
Can be reduced to :
There is no need here to use dynamic memory, neither to call strlen.
Hope it helps :)