← Questions

Insert plus or minus signs between digits to reach a target

0
MetaCodingLast asked Dec 2025

Given a string of digits and a target, insert +, - or nothing between consecutive digits so the expression equals the target, and return every such expression. Handle numbers with leading zeros.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding