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.
Concerning
data1
, I assumed it is a string likedata
, but with different cities or records. However, as I didn't solved this kata yet, I can be wrong !Concerning the definition of
data
in C, the '\0' is automatically added. For exemple,char string = "hello" ;
creates a string of 6 char : "hello\0".This Kata is meh. I pass 54 out of 58 tests, 3 of them failing are due to rounding discrepancies in the expected results and one of them having for some reason an expected result that differs from the result one would get with the actual input.
I'm having the same issue, I don't understand how that can possibly become 18h and 20mins.
This comment is hidden because it contains spoiler information about the solution
Could you actually provide some useful info like your code and not a wall of text saying basically nothing?
I try to code this kata with C. I don't understand why in the test cases, my results are transformed in nonsense by the array2StringInt function, when the function works just fine with the array of expected results, and also with other arrays I tried. So I'm lost somewhere in these 3 line (and the return of the race function I wrote probably ?) :
int act = race(v1, v2, g);
char sact = array2StringInt(act, 3);
char* sexpr = array2StringInt(expr, 3);
The error is : Error. Expected -1, -1, -1 but got 27076368, 0, 27076368
The numbers after got are never the same, they don't match the adresses, I checked that and a few other things, with all the test cases proposed...
I got back to my books about C, and arrays, and pointer, and I found no ideas. My algorithm is okay, I got the correct values when I print them and it works when translated into Java.
Does anyone have an idea about what I should do / try / test ? Did someone had the same issue in C ?