GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcode.cn — 164. 最大间距 - 力扣(LeetCode) 题目描述 题目描述 题解 题解 提交记录 提交记录 中等 给定一个无序的数组 您必须编写一个在「线性时间」内运行并使用「线性额外空间」的算法。
示例 1: 输入: nums = [3,6,9,1] 输出: 3 解释: 排序后的数组是 [1,3,6,9], 其中相邻元素 (3,6) 和 (6,9) 之间都存在最大差值 3。 示例 2: 输入: nums = [10] 输出: 0 解释: 数组元素个数小于 2,因此返回 0。
提示:
代码 代码 测试用例 测试用例 测试结果 测试结果 |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |