Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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 😠

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Very clean - good job!

  • Custom User Avatar

    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.