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.
@th
for any kata, you are free to create a suggestion post that provides your own personal revamped version of the description that you feel would be an improvement
!
Yes, the description is terribly! poorly written! that they let something like this go live ...
Not an issue.
s
s3
is read without having been initializedit would have been better to allocate the string beforehand yes, but it is too late now. The tests now
free()
the returned string, so there are no memory leaks.it is now specified in the initial code, and the tests
free
the returned pointer.your array
ans
is not initialized. as a result, your code's behavior is unpredictable. the tests suite cannot catch such undefined behavior in your code.fixed
done
Where do you see this part in the description? It doesn't really exist. It's asking for a new string, so that should hint you that it's neither string
a
orb
.The description isn't ideal, but it's short and to the point, and the given examples in the description should make it clear what's actually asked for.
The description is wrong compared to the solutions it's asking for. It's asking you to return the longest string out of 2 but actually it wants you to return all unique characters from BOTH strings.
this is what I was trying to do with my solution, was trying to figure out how to pass a variable to inner function, which in this case is to return a function that takes a variable. Didn't think of that... thank you.