Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Expression Add Operators
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given a string of digits and target value, return all expressions by adding operators between digits.
Sample Input:
"123", 6
Sample Output:
["1+2+3","1*2*3"]
Hints
Hint 1
Use backtracking to try all operators
Hint 2
Handle multiplication precedence carefully
Hint 3
Track current value and last value for multiplication
Code Editor
Reset
Run
Save
Loading...