7 kyu
Mobile Display Keystrokes
562 of 1,527zruF
Description:
Do you remember the old mobile display keyboards? Do you also remember how inconvenient it was to write on it?
Well, here you have to calculate how many keystrokes you have to do for a specific word.
This is the layout:

Given a string, return the number of keystrokes necessary to type it. You can assume that the input will entirely consist of characters included in the mobile layout (lowercase letters, digits, and the symbols *
and #
).
Examples
"*#" => 2 (1 + 1)
"123" => 3 (1 + 1 + 1)
"abc" => 9 (2 + 3 + 4)
"codewars" => 26 (4 + 4 + 2 + 3 + 2 + 2 + 4 + 5)
Fundamentals
Similar Kata:
Stats:
Created | Jun 30, 2017 |
Published | Jun 30, 2017 |
Warriors Trained | 2450 |
Total Skips | 27 |
Total Code Submissions | 4524 |
Total Times Completed | 1527 |
JavaScript Completions | 562 |
Python Completions | 676 |
Ruby Completions | 82 |
C Completions | 81 |
C# Completions | 134 |
Go Completions | 56 |
Total Stars | 24 |
% of votes with a positive feedback rating | 92% of 356 |
Total "Very Satisfied" Votes | 303 |
Total "Somewhat Satisfied" Votes | 50 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |