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.
Agreed - there should be a reasonable compromise between readability and concision when programming. Given this Kata, I'd personally understand a piece code much better if it wasn't indeed crammed into a single line, where the reader has to put so much effort in trying to decipher and understand the "cleverness" of the code.
Found a problem myself... For every iteration of the loop strlen(str1) is computed, which wastes time. I computed both strlen(str1) and strlen(str2) before the loop to fix the issue and the algorithm works faster and I passed the performance test. Very annoyed by this issue - spent hours trying to figure it out ðŸ˜
This comment is hidden because it contains spoiler information about the solution
Very clean - good job!
I am very impressed - a very clever solution! My solution took me a while and I wrote 60 lines in total (adding comments explaining everything). Your solution is a lot better, but mine is more readable, in my opinion.