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-03-29 15:21:05 +08:00
parent b84ae535b7
commit e730aa6794
2244 changed files with 8703 additions and 59499 deletions

View File

@@ -12,7 +12,7 @@
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 28,
"dislikes": 34,
"dislikes": 35,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "\"abcd\"\n\"bccda\"\n\"ab\"\n\"cd\"",
@@ -40,7 +40,7 @@
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"1.2K\", \"totalSubmission\": \"1.9K\", \"totalAcceptedRaw\": 1214, \"totalSubmissionRaw\": 1872, \"acRate\": \"64.9%\"}",
"stats": "{\"totalAccepted\": \"1.2K\", \"totalSubmission\": \"1.9K\", \"totalAcceptedRaw\": 1219, \"totalSubmissionRaw\": 1882, \"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."