mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 23:11:41 +08:00
update
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"18.3K\", \"totalSubmission\": \"35.7K\", \"totalAcceptedRaw\": 18282, \"totalSubmissionRaw\": 35666, \"acRate\": \"51.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"18.3K\", \"totalSubmission\": \"35.7K\", \"totalAcceptedRaw\": 18286, \"totalSubmissionRaw\": 35672, \"acRate\": \"51.3%\"}",
|
||||
"hints": [
|
||||
"* If the expression starts with a digit or '-', it's an integer: return it.\r\n\r\n* If the expression starts with a letter, it's a variable. Recall it by checking the current scope in reverse order.\r\n\r\n* Otherwise, group the tokens (variables or expressions) within this expression by counting the \"balance\" `bal` of the occurrences of `'('` minus the number of occurrences of `')'`. When the balance is zero, we have ended a token. For example, `(add 1 (add 2 3))` should have tokens `'1'` and `'(add 2 3)'`.\r\n\r\n* For add and mult expressions, evaluate each token and return the addition or multiplication of them.\r\n\r\n* For let expressions, evaluate each expression sequentially and assign it to the variable in the current scope, then return the evaluation of the final expression."
|
||||
],
|
||||
|
Reference in New Issue
Block a user