mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part2
This commit is contained in:
@@ -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 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>["A","1","B","C","D","2","3","4","E","5","F","G","6","7","H","I","J","K","L","M"]
|
||||
|
||||
<strong>Output: </strong>["A","1","B","C","D","2","3","4","E","5","F","G","6","7"]
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input: </strong>["A","A"]
|
||||
|
||||
<strong>Output: </strong>[]
|
||||
</pre>
|
||||
|
||||
<p><strong>Note: </strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>array.length <= 100000</code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user