Uber SDE2 | Bangalore | Phone
Anonymous User
1630

Given a string, generate all the possible expressions from it.
Example:
Input: 3481
Output:

3+4+8+1
3+4-8+1
34+8+1
3*4/8+1
348+1
and so on

Operators allowed: +, -, *, /
(Phone Interview, was asked to run the code)

Comments (4)