Keyboard Row
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
On a standard American QWERTY keyboard the letters sit on three rows:
- row 1: qwertyuiop
- row 2: asdfghjkl
- row 3: zxcvbnm
Given an array of strings words, return the words that can be typed using letters from only one of these rows. Letter case does not matter ('A' is on the same row as 'a').
Return the qualifying words exactly as given, in the same order they appear in words.
Examples
Constraints
- 1 <= words.length <= 20
- 1 <= words[i].length <= 100
- `words[i]` consists of lowercase and uppercase English letters
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.