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

View File

@@ -11,8 +11,8 @@
"translatedContent": null,
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 551,
"dislikes": 1473,
"likes": 552,
"dislikes": 1476,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Mini Parser\", \"titleSlug\": \"mini-parser\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Ternary Expression Parser\", \"titleSlug\": \"ternary-expression-parser\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
"exampleTestcases": "[\"/*Test program */\", \"int main()\", \"{ \", \" // variable declaration \", \"int a, b, c;\", \"/* This is a test\", \" multiline \", \" comment for \", \" testing */\", \"a = b + c;\", \"}\"]\n[\"a/*comment\", \"line\", \"more_comment*/b\"]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"52.8K\", \"totalSubmission\": \"141.6K\", \"totalAcceptedRaw\": 52804, \"totalSubmissionRaw\": 141613, \"acRate\": \"37.3%\"}",
"stats": "{\"totalAccepted\": \"52.9K\", \"totalSubmission\": \"141.7K\", \"totalAcceptedRaw\": 52868, \"totalSubmissionRaw\": 141739, \"acRate\": \"37.3%\"}",
"hints": [
"Carefully parse each line according to the following rules:\r\n\r\n* If we start a block comment and we aren't in a block, then we will skip over the next two characters and change our state to be in a block.\r\n\r\n* If we end a block comment and we are in a block, then we will skip over the next two characters and change our state to be *not* in a block.\r\n\r\n* If we start a line comment and we aren't in a block, then we will ignore the rest of the line.\r\n\r\n* If we aren't in a block comment (and it wasn't the start of a comment), we will record the character we are at.\r\n\r\n* At the end of each line, if we aren't in a block, we will record the line."
],