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.
Clearly the above mentioned points contradict this point. Also description is shared amongst all languages, so changing the requirements of a specific language is not feasible, let alone the amount of languages and solves as of now ...
Na, it's important to give that kind of feedback. We see far too often solutions with bad time complexities that are voted as best practices while there are more efficient and yet simple solutions.
The user is 7kyu. That they solved the problem correctly with such readable code is impressive. Give them a break :)
This comment is hidden because it contains spoiler information about the solution
I know that, thank you) Obviously the solution wasn't designed to handle NULL pointers and chars other than latin letters, since it's unnecessary for the kata
Make it generic machine independent code. Good work.
I know. I did not mean to be picky :smile. There are things which are in your control i.e. checking null pointer. You do not have any control over non null terminated string.
You're correct, and it's not unusual in C for functions that take a null-terminated string to behave that way. Try it yourself, most implementations of
strlen()
orprintf()
will segfault if you passNULL
.Your code will segfault when NULL parameter is passed.
O(n2)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution