mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 13:06:47 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个仅包含数字 <code>0-9</code> 的字符串 <code>num</code> 和一个目标值整数 <code>target</code> ,在 <code>num</code> 的数字之间添加 <strong>二元 </strong>运算符(不是一元)<code>+</code>、<code>-</code> 或 <code>*</code> ,返回 <strong>所有</strong> 能够得到 <code>target </code>的表达式。</p>\n\n<p>注意,返回表达式中的操作数 <strong>不应该</strong> 包含前导零。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> <code>num = </code>\"123\", target = 6\n<strong>输出: </strong>[\"1+2+3\", \"1*2*3\"] \n<strong>解释: </strong>“1*2*3” 和 “1+2+3” 的值都是6。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> <code>num = </code>\"232\", target = 8\n<strong>输出: </strong>[\"2*3+2\", \"2+3*2\"]\n<strong>解释:</strong> “2*3+2” 和 “2+3*2” 的值都是8。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> <code>num = </code>\"3456237490\", target = 9191\n<strong>输出: </strong>[]\n<strong>解释: </strong>表达式 “3456237490” 无法得到 9191 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= num.length <= 10</code></li>\n\t<li><code>num</code> 仅含数字</li>\n\t<li><code>-2<sup>31</sup> <= target <= 2<sup>31</sup> - 1</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 389,
|
||||
"likes": 390,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Evaluate Reverse Polish Notation\", \"titleSlug\": \"evaluate-reverse-polish-notation\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u9006\\u6ce2\\u5170\\u8868\\u8fbe\\u5f0f\\u6c42\\u503c\"}, {\"title\": \"Basic Calculator\", \"titleSlug\": \"basic-calculator\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u57fa\\u672c\\u8ba1\\u7b97\\u5668\"}, {\"title\": \"Basic Calculator II\", \"titleSlug\": \"basic-calculator-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u57fa\\u672c\\u8ba1\\u7b97\\u5668 II\"}, {\"title\": \"Different Ways to Add Parentheses\", \"titleSlug\": \"different-ways-to-add-parentheses\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u4e3a\\u8fd0\\u7b97\\u8868\\u8fbe\\u5f0f\\u8bbe\\u8ba1\\u4f18\\u5148\\u7ea7\"}, {\"title\": \"Target Sum\", \"titleSlug\": \"target-sum\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u76ee\\u6807\\u548c\"}]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"21.6K\", \"totalSubmission\": \"44.7K\", \"totalAcceptedRaw\": 21566, \"totalSubmissionRaw\": 44745, \"acRate\": \"48.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"21.6K\", \"totalSubmission\": \"44.8K\", \"totalAcceptedRaw\": 21589, \"totalSubmissionRaw\": 44824, \"acRate\": \"48.2%\"}",
|
||||
"hints": [
|
||||
"Note that a number can contain multiple digits.",
|
||||
"Since the question asks us to find <b>all</b> of the valid expressions, we need a way to iterate over all of them. (<b>Hint:</b> Recursion!)",
|
||||
|
Reference in New Issue
Block a user