File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 4
4
import java .util .Collections ;
5
5
import java .util .List ;
6
6
7
- /**
8
- * 624. Maximum Distance in Arrays
9
- *
10
- * Given m arrays, and each array is sorted in ascending order.
11
- * Now you can pick up two integers from two different arrays (each array picks one)
12
- * and calculate the distance. We define the distance between two
13
- * integers a and b to be their absolute difference |a-b|. Your task is to find the maximum distance.
14
-
15
- Example 1:
16
- Input:
17
- [[1,2,3],
18
- [4,5],
19
- [1,2,3]]
20
-
21
- Output: 4
22
-
23
- Explanation:
24
-
25
- One way to reach the maximum distance 4 is to pick 1 in the first or third array and pick 5 in the second array.
26
-
27
- Note:
28
- Each given array will have at least 1 number. There will be at least two non-empty arrays.
29
- The total number of the integers in all the m arrays will be in the range of [2, 10000].
30
- The integers in the m arrays will be in the range of [-10000, 10000].
31
- */
32
7
public class _624 {
33
8
34
9
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments