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
hold the phone! I have been trying to guess the maximum size required when [creating a variable on the heap? / allocating memory on the heap?]. I'm not even sure how to say that.
why does char *ret = calloc(1,1) work, when a 1 character array is not long enough for the task?!?
When I created my buffer array, I first attempted to make each dimension of the array size n (int buff[n][n];), but the compiler told me I could not make a variable sized array. How would I go about sizing this buffer array in a less wasteful way?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
May I bother someone to discuss the syntax for index incrementation technique here?
I learned, through this exercise that (*i1)++ != *i1++; however, I'm still not entirely clear why.
I think that because no assignment is being made to or from *index1 in the incrementation area of the for loop, that ++i is identical in function to i++.
I also think that *i1++ increments the pointer (address?) and (*i1)++ increments the dereferenced value of the pointer.
I guess my question is whether I'm uderstanding correctly, and whether ++*index1 instead of *index1++ has different syntax rules.
TA
didn't get that precision with your casio wristwatch, did you?
May I bother someone to review my solution? I receive errors intermittently (on the random tests) that are related to memory allocation (I think?) I'm only about half way through my primer and making a lot of guesses regarding memory management...
errors i receive:
free(): invalid next size (fast)
free(): invalid pointer
realloc(): invalid next size
Yes, I think that was my reasoning for the 2x (It's been a while).
Any overreach is cleaned up by the
realloc
at the end so I am not left holding more memory than was actually needed.This comment is hidden because it contains spoiler information about the solution
Thank you for the insight. Was multiplying strlen(camelCase) by two a a worst case, to avoid the extra 2 lines?
This comment is hidden because it contains spoiler information about the solution
credit: @cvetkovem for the [unicode?].
This comment is hidden because it contains spoiler information about the solution
Loading more items...