Google | Phone Screen | 282. Expression Add Operators
Anonymous User
5161
Apr 16, 2024
Apr 16, 2024
This was asked in Google Phone Screen.
Input :
2 3 4
List of all operators including "(" and ")".
Target = 20
Output = ( 2 + 3 ) * 4
Return list of all such expressions which evaluate to target.
I prososed to do it via Backtracking but he said try if you can do it via trees.
Finally, wrote code using backtracking but it wasn't completely done.
Let me know your solution using trees/backtracking.
Same as : https://leetcode.com/problems/expression-add-operators/
Comments (11)


