Expression target sum
Your task
Given a string num containing only digits and an integer target, return all expressions formed by inserting the binary operators '+', '-', or '*' between the digits of num (in order, no reordering) so that the expression evaluates to target. No operand may have a leading zero (except the single digit 0). Return the expressions sorted lexicographically. The length of num is at most 10.
Examples
add_operators(num: str, target: int) -> list[str]Example 1
Input
add_operators("123", 6)Output
["1*2*3", "1+2+3"]