1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -11,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 496,
"dislikes": 9,
"likes": 580,
"dislikes": 12,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Two Furthest Houses With Different Colors\", \"titleSlug\": \"two-furthest-houses-with-different-colors\", \"difficulty\": \"Easy\", \"translatedTitle\": null}]",
"exampleTestcases": "[55,30,5,4,2]\n[100,20,10,10,5]\n[2,2,2]\n[10,10,1]\n[30,29,19,5]\n[25,25,25,25,25]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"19.5K\", \"totalSubmission\": \"39.8K\", \"totalAcceptedRaw\": 19515, \"totalSubmissionRaw\": 39780, \"acRate\": \"49.1%\"}",
"stats": "{\"totalAccepted\": \"22.4K\", \"totalSubmission\": \"44.6K\", \"totalAcceptedRaw\": 22425, \"totalSubmissionRaw\": 44615, \"acRate\": \"50.3%\"}",
"hints": [
"Since both arrays are sorted in a non-increasing way this means that for each value in the first array. We can find the farthest value smaller than it using binary search.",
"There is another solution using a two pointers approach since the first array is non-increasing the farthest j such that nums2[j] ≥ nums1[i] is at least as far as the farthest j such that nums2[j] ≥ nums1[i-1]"