1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +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": "Hard",
"likes": 523,
"dislikes": 167,
"likes": 531,
"dislikes": 169,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Valid Parenthesis String\", \"titleSlug\": \"valid-parenthesis-string\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "\"11011000\"\n\"10\"",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"13.2K\", \"totalSubmission\": \"22K\", \"totalAcceptedRaw\": 13184, \"totalSubmissionRaw\": 22041, \"acRate\": \"59.8%\"}",
"stats": "{\"totalAccepted\": \"13.3K\", \"totalSubmission\": \"22.2K\", \"totalAcceptedRaw\": 13302, \"totalSubmissionRaw\": 22242, \"acRate\": \"59.8%\"}",
"hints": [
"Draw a line from (x, y) to (x+1, y+1) if we see a \"1\", else to (x+1, y-1).\r\nA special substring is just a line that starts and ends at the same y-coordinate, and that is the lowest y-coordinate reached.\r\nCall a mountain a special substring with no special prefixes - ie. only at the beginning and end is the lowest y-coordinate reached.\r\nIf F is the answer function, and S has mountain decomposition M1,M2,M3,...,Mk, then the answer is:\r\nreverse_sorted(F(M1), F(M2), ..., F(Mk)).\r\nHowever, you'll also need to deal with the case that S is a mountain, such as 11011000 -> 11100100."
],