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.
Very nice!
wow! I didn't knew you could use end[-1] insted of *(end - 1) as well;
THANK YOU!
You could use this code verbatim for the C version as well.
guess we should use
(current < end && (*current == '.' || *current == '-'))
or do not usecurrent < end
check at all.Nice fundamental use of pointers.
Was also a lot less work than the 1kyu and 2kyu ones I did; solution is quite small even. Thinking wise it's a bit you'll have to chew through, but I guess the same applies to the harder problems if you don't happen to be familiar with the area yet.
Looks fine to me now?
This comment is hidden because it contains spoiler information about the solution
It would be so nice if this was available for C++ as well.
The C++ variant is not very well executed. The data types and ways of use will cause your solution to have bugs caused by them, and the interface is 100% a C interface. It could do with moving to std::vector<uint8_t> instead of a newly invented struct for entering binary data, and a std::string for returning the stringified version. This would also avoid the hour of debugging I had at the end, due to not casting away the ugly entry types in all spots. This also makes it harder to have a good solution, as you start with the bad interface.