Ad
  • Custom User Avatar

    It said "You always walk only a single block for each letter (direction)", and I thought this means if there are multiple consecutive leters for the same direction, you only do a single block in that direction. Totally misunderstood this part, my bad.

  • Custom User Avatar

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

  • Custom User Avatar

    This method is design for such type of problems, can't believe it's not on the top of the best practice page.

  • Custom User Avatar

    The fact that the line is over 100 characters long. It helps others to read your code when you break it down by logic, just like you break down your speech with pauses. Most programmer's job is not that much of writing your own code, but fixing and optimizing the someone else's existing code. Now, imaging you have to read not a level 8 kata code but FAANG level code written as a 1-mile sentence.

    There is a book, programmer's bible, called 'Clean Code' by Robert Martin, I'd really recommend it to everyone who is learning programming.

  • Custom User Avatar

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