Skip to content

Latest commit

 

History

History
executable file
·
23 lines (14 loc) · 563 Bytes

File metadata and controls

executable file
·
23 lines (14 loc) · 563 Bytes

题目

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.

pic

Example 1:

Input: ["Hello", "Alaska", "Dad", "Peace"]
Output: ["Alaska", "Dad"]

Note:

  1. You may use one character in the keyboard more than once.
  2. You may assume the input string will only contain letters of alphabet.

解题思路

见程序注释