Expression Add Operators

Given a digit-only string num and an integer target, insert binary operators +, -, and * between digits (or insert no operator) and return every expression whose value equals target.

Rule...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: