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.
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.
There are 10 directions there, why do you say it would only take 9 minutes and not 10?
This comment is hidden because it contains spoiler information about the solution
This method is design for such type of problems, can't believe it's not on the top of the best practice page.
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.
This comment is hidden because it contains spoiler information about the solution