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.
you have a memory leak.
Brain fart on my end. I initially wrote the tester and used const int for the index
n
to ensure it wouldn't be modified within the scope of the tester. I carried over that same approach to the function definition, but you're right — sincen
is passed by value and not by reference, making it const doesn't serve any purpose in the function prototype.I've corrected the prototype based on your suggestion!
merged!
The Kata has been updated according to your suggestions. Thanks for your input!
The feedback based on the pointer address has already been added. If the pointer returned points to the wrong address in memory, it will indicate that. I am also considering changing the description as you suggested. Thank you for your input!
Done! :)
Thanks for the suggestion! I made the appropriate changes to clarify the structure of the array.
Good catch. Thanks for reporting!
I see what you mean now - "remove" is definitely not the correct word to describe the expected operation for this Kata. Thank you for your input.
"people would assume you want move the characters from a string to a different string" - that's precisely the challenge. Extract the n-th string term and return it. You must do so by allocating the characters in a new string. Am I missing something?
One way to reach '5' is by adding
5 + 0
. In this case, the largest number in the group is '5', and the smallest is '0'. Therefore, the range is:5 - 0 = 5
.Olá Luca, o seu código apresenta um problema ao assumir que a variável 'b' possui apenas um elemento. Na verdade, 'b' pode conter múltiplos valores. Consoante você tem no seu código, você acessa apenas o primeiro índice da variável 'b'.