mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 21:46:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你两个长度相等的整数数组,返回下面表达式的最大值:</p>\n\n<p><code>|arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j|</code></p>\n\n<p>其中下标 <code>i</code>,<code>j</code> 满足 <code>0 <= i, j < arr1.length</code>。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>arr1 = [1,2,3,4], arr2 = [-1,4,5,6]\n<strong>输出:</strong>13\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>arr1 = [1,-2,-5,0,10], arr2 = [0,-2,-1,-7,-4]\n<strong>输出:</strong>20</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>2 <= arr1.length == arr2.length <= 40000</code></li>\n\t<li><code>-10^6 <= arr1[i], arr2[i] <= 10^6</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 58,
|
||||
"likes": 59,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"3.5K\", \"totalSubmission\": \"7.6K\", \"totalAcceptedRaw\": 3498, \"totalSubmissionRaw\": 7585, \"acRate\": \"46.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"3.6K\", \"totalSubmission\": \"7.7K\", \"totalAcceptedRaw\": 3551, \"totalSubmissionRaw\": 7696, \"acRate\": \"46.1%\"}",
|
||||
"hints": [
|
||||
"Use the idea that abs(A) + abs(B) = max(A+B, A-B, -A+B, -A-B)."
|
||||
],
|
||||
|
Reference in New Issue
Block a user