1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-11 02:11:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

批量更新数据

This commit is contained in:
2025-01-09 20:29:41 +08:00
parent 04ecea043d
commit 48cdd06c2b
5053 changed files with 156164 additions and 135322 deletions

View File

@@ -1,5 +1,7 @@
<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><strong>Note</strong> that the strings are <strong>case-insensitive</strong>, both lowercased and uppercased of the same letter are treated as if they are at the same row.</p>
<p>In the <strong>American keyboard</strong>:</p>
<ul>
@@ -11,24 +13,31 @@
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre>
<strong>Input:</strong> words = [&quot;Hello&quot;,&quot;Alaska&quot;,&quot;Dad&quot;,&quot;Peace&quot;]
<strong>Output:</strong> [&quot;Alaska&quot;,&quot;Dad&quot;]
</pre>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">words = [&quot;Hello&quot;,&quot;Alaska&quot;,&quot;Dad&quot;,&quot;Peace&quot;]</span></p>
<p><strong>Output:</strong> <span class="example-io">[&quot;Alaska&quot;,&quot;Dad&quot;]</span></p>
<p><strong>Explanation:</strong></p>
<p>Both <code>&quot;a&quot;</code> and <code>&quot;A&quot;</code> are in the 2nd row of the American keyboard due to case insensitivity.</p>
</div>
<p><strong class="example">Example 2:</strong></p>
<pre>
<strong>Input:</strong> words = [&quot;omk&quot;]
<strong>Output:</strong> []
</pre>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">words = [&quot;omk&quot;]</span></p>
<p><strong>Output:</strong> <span class="example-io">[]</span></p>
</div>
<p><strong class="example">Example 3:</strong></p>
<pre>
<strong>Input:</strong> words = [&quot;adsdf&quot;,&quot;sfd&quot;]
<strong>Output:</strong> [&quot;adsdf&quot;,&quot;sfd&quot;]
</pre>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">words = [&quot;adsdf&quot;,&quot;sfd&quot;]</span></p>
<p><strong>Output:</strong> <span class="example-io">[&quot;adsdf&quot;,&quot;sfd&quot;]</span></p>
</div>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>