There is a standard keyboard layout with
Row "qwertyuiop"
Row "asdfghjkl"
Row "zxcvbnm"
Each letter is located at a coordinate
You start with your finger positioned at the letter 'a' at coordinate
Given a string s, return the total distance traveled to type all characters in s in sequence using one finger.
Constraints:
s.length
s consists of lowercase English letters only.
There is a standard keyboard layout with
Row "qwertyuiop"
Row "asdfghjkl"
Row "zxcvbnm"
Each letter is located at a coordinate
You start with your finger positioned at the letter 'a' at coordinate
Given a string s, return the total distance traveled to type all characters in s in sequence using one finger.
Constraints:
s.length
s consists of lowercase English letters only.