Problem 50. QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and its position starting from the leftmost digit or letter on that row.
Examples:
Input key = 'a'
Output r = 3
c = 1
Input key = '0'
Output r = 1
c = 10
Input key = 'y'
Output r = 2
c = 6
Solution Stats
Problem Comments
-
1 Comment
Tran Tran
on 19 Mar 2022
Create a key board matrix and find ez.Should add more space ' ' char to fill the gap in each row cause number of elements in rows are not equally.
Solution Comments
Show commentsProblem Recent Solvers2262
Suggested Problems
-
Back to basics 25 - Valid variable names
324 Solvers
-
Flip the main diagonal of a matrix
806 Solvers
-
Flag largest magnitude swings as they occur
678 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
823 Solvers
-
Find the dimensions of a matrix
521 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!