Various bugfixes

This commit is contained in:
danielyxie
2019-02-20 00:42:27 -08:00
parent 6d81c00f37
commit 107977e6f4
19 changed files with 139 additions and 71 deletions

View File

@@ -208,3 +208,16 @@ The list contains the name of (i.e. the value returned by
| | | (a)())() -> ["(a)()()", "(a())()"] |
| | | )( -> [""] |
+------------------------------------+------------------------------------------------------------------------------------------+
| Find All Valid Math Expressions | | You are given a string which contains only digits between 0 and 9 as well as a target |
| | | number. Return all possible ways you can add the +, -, and * operators to the string |
| | | of digits such that it evaluates to the target number. |
| | | |
| | | The answer should be provided as an array of strings containing the valid expressions. |
| | | |
| | | Examples: |
| | | Input: digits = "123", target = 6 |
| | | Output: ["1+2+3", "1*2*3"] |
| | | |
| | | Input: digits = "105", target = 5 |
| | | Output: ["1*0+5", "10-5"] |
+------------------------------------+------------------------------------------------------------------------------------------+