Back to problems

Target Expressions from Ordered Digits

Algorithm · Google · Hard

Construct Arithmetic Expressions Medium · Topics · Company Tags · Hints Given an array digits of single‑digit integers (each between 0 and 9) and an integer target, return every possible arithmetic expression that uses every digit exactly once, preserves the original digit order, and evaluates to target. You may only insert the binary operators + (addition) and * (multiplication) between digits. Parentheses ( and ) may be placed anywhere to explicitly group operations.…

Checking your access…