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,14 +11,33 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 199,
"dislikes": 8,
"likes": 344,
"dislikes": 12,
"isLiked": null,
"similarQuestions": "[]",
"exampleTestcases": "\"001101\"\n\"11100\"",
"categoryTitle": "Algorithms",
"contributors": [],
"topicTags": [],
"topicTags": [
{
"name": "String",
"slug": "string",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Dynamic Programming",
"slug": "dynamic-programming",
"translatedName": null,
"__typename": "TopicTagNode"
},
{
"name": "Prefix Sum",
"slug": "prefix-sum",
"translatedName": null,
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": [
{
@@ -130,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"6.8K\", \"totalSubmission\": \"16.5K\", \"totalAcceptedRaw\": 6758, \"totalSubmissionRaw\": 16458, \"acRate\": \"41.1%\"}",
"stats": "{\"totalAccepted\": \"10.1K\", \"totalSubmission\": \"22.5K\", \"totalAcceptedRaw\": 10109, \"totalSubmissionRaw\": 22525, \"acRate\": \"44.9%\"}",
"hints": [
"There are only 2 valid patterns: 101 and 010. Think about how we can construct these 2 patterns from smaller patterns.",
"Count the number of subsequences of the form 01 or 10 first. Let n01[i] be the number of 01 subsequences that exist in the prefix of s up to the ith building. How can you compute n01[i]?",