Company: Honeywell
Difficulty: easy
Keyboard Each day, to enter their building, the employees of an e-commerce company must type a string of digits into a console using a 3 x 3 numeric keypad. Every day the nine digits are shuffled into new positions on the keypad. The keypad layout for the day is given as a string keypad of 9 digits. The first 3 characters are the top row of the keypad from left to right, the next 3 characters are the middle row, and the last 3 characters are the bottom row. The nine characters are the digits 1 through 9 , each appearing exactly once. An employee types the string s one character at a time, using a single finger, according to these rules: It takes 0 seconds to move the finger to the first key that is pressed, and it takes 0 seconds to press the key the finger is currently on, any number of times. The finger can move from one key to any adjacent key in 1 second. Keys that touch only at a corner (a diagonal step) are also adjacent. * Moving to a key that is not adjacent is done as a series