Skip to content

Commit 4602a5a

Browse files
committed
Create README - LeetHub
1 parent 9588e14 commit 4602a5a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<h2><a href="https://leetcode.com/problems/maximum-distance-in-arrays/">624. Maximum Distance in Arrays</a></h2><h3>Medium</h3><hr><div><p>You are given <code>m</code> <code>arrays</code>, where each array is sorted in <strong>ascending order</strong>.</p>
2+
3+
<p>You can pick up two integers from two different arrays (each array picks one) and calculate the distance. We define the distance between two integers <code>a</code> and <code>b</code> to be their absolute difference <code>|a - b|</code>.</p>
4+
5+
<p>Return <em>the maximum distance</em>.</p>
6+
7+
<p>&nbsp;</p>
8+
<p><strong class="example">Example 1:</strong></p>
9+
10+
<pre><strong>Input:</strong> arrays = [[1,2,3],[4,5],[1,2,3]]
11+
<strong>Output:</strong> 4
12+
<strong>Explanation:</strong> 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.
13+
</pre>
14+
15+
<p><strong class="example">Example 2:</strong></p>
16+
17+
<pre><strong>Input:</strong> arrays = [[1],[1]]
18+
<strong>Output:</strong> 0
19+
</pre>
20+
21+
<p>&nbsp;</p>
22+
<p><strong>Constraints:</strong></p>
23+
24+
<ul>
25+
<li><code>m == arrays.length</code></li>
26+
<li><code>2 &lt;= m &lt;= 10<sup>5</sup></code></li>
27+
<li><code>1 &lt;= arrays[i].length &lt;= 500</code></li>
28+
<li><code>-10<sup>4</sup> &lt;= arrays[i][j] &lt;= 10<sup>4</sup></code></li>
29+
<li><code>arrays[i]</code> is sorted in <strong>ascending order</strong>.</li>
30+
<li>There will be at most <code>10<sup>5</sup></code> integers in all the arrays.</li>
31+
</ul>
32+
</div>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy