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.
I agree with this.
But wouldn't it be nicer to get rid of tolower? One can use a switch and "hardcode" both ascii values for x and o respectively. Also we could omit the char *p since we can iterate on str, but that's very likely optimized away by the compiler anyway.
Same reaction, didn't know this existed... idk why but smh it feels wrong to use "easy" solutions with low level languages like c++ and java. Great answer nontheless.