goals and issues

  1. Objectives and", difficulty level is "Medium".
    Tag: "DFS", "Memory Search", "Backpack DP", "01 Backpack" gives you an integer array nums and an integer target. By adding '+' or '-' before each integer in the array, and then concatenating all the integers, you can construct an expression: for example, nums = [2, 1], you can add '+' before 2, and before 1 Add '-' before and concatenate to get the expression "+2-1". Returns the number of distinct expressions that can be constructed using the method above that evaluate to target.

282. Add operators to expressions.
Given a string num containing only numbers 0-9 and a target value integer target, add binary operators (not unary) +, - or * between the numbers of num, and return All expressions that yield a target value.

Guess you like

Origin blog.csdn.net/weixin_45719581/article/details/120795326