mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 12248,
|
||||
"dislikes": 535,
|
||||
"likes": 12279,
|
||||
"dislikes": 537,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Generate Parentheses\", \"titleSlug\": \"generate-parentheses\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Longest Valid Parentheses\", \"titleSlug\": \"longest-valid-parentheses\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Remove Invalid Parentheses\", \"titleSlug\": \"remove-invalid-parentheses\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Check If Word Is Valid After Substitutions\", \"titleSlug\": \"check-if-word-is-valid-after-substitutions\", \"difficulty\": \"Medium\", \"translatedTitle\": null}, {\"title\": \"Check if a Parentheses String Can Be Valid\", \"titleSlug\": \"check-if-a-parentheses-string-can-be-valid\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]",
|
||||
"exampleTestcases": "\"()\"\n\"()[]{}\"\n\"(]\"",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"2.1M\", \"totalSubmission\": \"5.1M\", \"totalAcceptedRaw\": 2104032, \"totalSubmissionRaw\": 5148549, \"acRate\": \"40.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"2.1M\", \"totalSubmission\": \"5.2M\", \"totalAcceptedRaw\": 2108745, \"totalSubmissionRaw\": 5160164, \"acRate\": \"40.9%\"}",
|
||||
"hints": [
|
||||
"An interesting property about a valid parenthesis expression is that a sub-expression of a valid expression should also be a valid expression. (Not every sub-expression) e.g.\r\n\r\n<pre>\r\n{ { } [ ] [ [ [ ] ] ] } is VALID expression\r\n [ [ [ ] ] ] is VALID sub-expression\r\n { } [ ] is VALID sub-expression\r\n</pre>\r\n\r\nCan we exploit this recursive structure somehow?",
|
||||
"What if whenever we encounter a matching pair of parenthesis in the expression, we simply remove it from the expression? This would keep on shortening the expression. e.g.\r\n\r\n<pre>\r\n{ { ( { } ) } }\r\n |_|\r\n\r\n{ { ( ) } }\r\n |______|\r\n\r\n{ { } }\r\n |__________|\r\n\r\n{ }\r\n|________________|\r\n\r\nVALID EXPRESSION!\r\n</pre>",
|
||||
|
Reference in New Issue
Block a user