1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21: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,13 @@
<p>在一个整数数组中,&ldquo;&rdquo;是大于或等于相邻整数的元素,相应地,&ldquo;&rdquo;是小于或等于相邻整数的元素。例如,在数组{5, 8, 4, 2, 3, 4, 6}中,{8, 6}是峰, {5, 2}是谷。现在给定一个整数数组,将该数组按峰与谷的交替顺序排序。</p>
<p><strong>示例:</strong></p>
<pre><strong>输入: </strong>[5, 3, 1, 2, 3]
<strong>输出:</strong>&nbsp;[5, 1, 3, 2, 3]
</pre>
<p><strong>提示:</strong></p>
<ul>
<li><code>nums.length &lt;= 10000</code></li>
</ul>