You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Input: [[4,10,15,24,26], [0,9,12,20], [5,18,22,30]]
Output: [20,24]
Explanation:
List 1: [4, 10, 15, 24,26], 24 is in range [20,24].
List 2: [0, 9, 12, 20], 20 is in range [20,24].
List 3: [5, 18, 22, 30], 22 is in range [20,24].
Note
给定的列表可能包含重复元素,所以在这里升序表示 >= 。
1 <= k <= 3500
-105 <= 元素的值 <= 105
The text was updated successfully, but these errors were encountered:
632. Smallest Range Covering Elements from K Lists
你有
k
个升序排列的整数数组。找到一个最小区间,使得k
个列表中的每个列表至少有一个数包含在其中。我们定义如果
b-a < d-c
或者在b-a == d-c
时a < c
,则区间[a,b]
比[c,d]
小。Example
Note
>=
。1 <= k <= 3500
-105 <= 元素的值 <= 105
The text was updated successfully, but these errors were encountered: