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

add leetcode problem-cn part2

This commit is contained in:
2022-03-27 20:38:29 +08:00
parent 5a4fa6db12
commit 0fc7f4b734
1617 changed files with 134637 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<p>Given an array filled with letters and numbers, find the longest subarray with an equal number of letters and numbers.</p>
<p>Return the subarray. If there are more than one answer, return the one which has the smallest&nbsp;index of its left endpoint. If there is no answer, return an empty arrary.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input: </strong>[&quot;A&quot;,&quot;1&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;E&quot;,&quot;5&quot;,&quot;F&quot;,&quot;G&quot;,&quot;6&quot;,&quot;7&quot;,&quot;H&quot;,&quot;I&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;M&quot;]
<strong>Output: </strong>[&quot;A&quot;,&quot;1&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;E&quot;,&quot;5&quot;,&quot;F&quot;,&quot;G&quot;,&quot;6&quot;,&quot;7&quot;]
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input: </strong>[&quot;A&quot;,&quot;A&quot;]
<strong>Output: </strong>[]
</pre>
<p><strong>Note: </strong></p>
<ul>
<li><code>array.length &lt;= 100000</code></li>
</ul>