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.
It's undefined behavior, at least. It probably causes a segmentation fault and crashes. At worst, it will seem to work but will corrupt some other data when you write to such an index.
You can find out if you either "Train Again" or hit "Fork" and change the tests to use any higher number within the array. I just tried it and it died with
I can not see checking for "order[i]>63". But in this code I see "int num[64] = {0}". What result of using num[68] for example?
Which other confused person is running around putting Spoiler flags on boilerplate and C programming discussion?
int num[MAX_INT] = {0};
doesn't fit into the stack.You could do
int *num = malloc(MAX_INT)
but you might get fired. I would fire you.edit: it's INT_MAX, actually. I forgot :P
This comment is hidden because it contains spoiler information about the solution
Excellent complexity. Large Allocations, where your solution benefits the most, shouldn't use VLAs. Large Stack Allocations will fail.