1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 23:11:41 +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

@@ -12,7 +12,7 @@
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 111,
"dislikes": 1169,
"dislikes": 1170,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Parse Lisp Expression\", \"titleSlug\": \"parse-lisp-expression\", \"difficulty\": \"Hard\", \"translatedTitle\": null}, {\"title\": \"Basic Calculator III\", \"titleSlug\": \"basic-calculator-iii\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]",
"exampleTestcases": "\"e + 8 - a + 5\"\n[\"e\"]\n[1]\n\"e - 8 + temperature - pressure\"\n[\"e\", \"temperature\"]\n[1, 12]\n\"(e + 8) * (e - 8)\"\n[]\n[]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"8K\", \"totalSubmission\": \"14.3K\", \"totalAcceptedRaw\": 7969, \"totalSubmissionRaw\": 14334, \"acRate\": \"55.6%\"}",
"stats": "{\"totalAccepted\": \"8K\", \"totalSubmission\": \"14.4K\", \"totalAcceptedRaw\": 7978, \"totalSubmissionRaw\": 14351, \"acRate\": \"55.6%\"}",
"hints": [
"One way is with a Polynomial class. For example,\r\n\r\n* `Poly:add(this, that)` returns the result of `this + that`.\r\n* `Poly:sub(this, that)` returns the result of `this - that`.\r\n* `Poly:mul(this, that)` returns the result of `this * that`.\r\n* `Poly:evaluate(this, evalmap)` returns the polynomial after replacing all free variables with constants as specified by `evalmap`.\r\n* `Poly:toList(this)` returns the polynomial in the correct output format.\r\n\r\n* `Solution::combine(left, right, symbol)` returns the result of applying the binary operator represented by `symbol` to `left` and `right`.\r\n* `Solution::make(expr)` makes a new `Poly` represented by either the constant or free variable specified by `expr`.\r\n* `Solution::parse(expr)` parses an expression into a new `Poly`."
],