Package g0401_0500.s0500_keyboard_row
Class Solution
java.lang.Object
g0401_0500.s0500_keyboard_row.Solution
500 - Keyboard Row.<p>Easy</p>
<p>Given an array of strings <code>words</code>, return <em>the words that can be typed using letters of the alphabet on only one row of American keyboard like the image below</em>.</p>
<p>In the <strong>American keyboard</strong>:</p>
<ul>
<li>the first row consists of the characters <code>"qwertyuiop"</code>,</li>
<li>the second row consists of the characters <code>"asdfghjkl"</code>, and</li>
<li>the third row consists of the characters <code>"zxcvbnm"</code>.</li>
</ul>
<p><img src="https://assets.leetcode.com/uploads/2018/10/12/keyboard.png" alt="" /></p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> words = [“Hello”,“Alaska”,“Dad”,“Peace”]</p>
<p><strong>Output:</strong> [“Alaska”,“Dad”]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> words = [“omk”]</p>
<p><strong>Output:</strong> []</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> words = [“adsdf”,“sfd”]</p>
<p><strong>Output:</strong> [“adsdf”,“sfd”]</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= words.length <= 20</code></li>
<li><code>1 <= words[i].length <= 100</code></li>
<li><code>words[i]</code> consists of English letters (both lowercase and uppercase).</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
findWords
-