1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -12,7 +12,7 @@
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 40,
"dislikes": 53,
"dislikes": 54,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "\"abcd\"\n\"bccda\"\n\"ab\"\n\"cd\"",
@@ -40,7 +40,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"1.8K\", \"totalSubmission\": \"2.7K\", \"totalAcceptedRaw\": 1779, \"totalSubmissionRaw\": 2746, \"acRate\": \"64.8%\"}",
"stats": "{\"totalAccepted\": \"1.8K\", \"totalSubmission\": \"2.7K\", \"totalAcceptedRaw\": 1780, \"totalSubmissionRaw\": 2747, \"acRate\": \"64.8%\"}",
"hints": [
"If the chosen substrings are of size larger than 1, then you can remove all but the first character from both substrings, and you'll get equal substrings of size 1, with the same a but less j. Hence, it's always optimal to choose substrings of size 1.",
"If you choose a specific letter, then it's optimal to choose its first occurrence in firstString, and its last occurrence in secondString, to minimize j-a."