99 Elm Problems/Problem 93

Given a list of integer numbers, find a correct way of inserting arithmetic signs (operators) such that the result is a correct equation, if possible. Example: [2,3,5,7,11] we can form the equations 2-3+5+7 = 11 or 2 = (3*5+7)/11 (and ten others).

Division should be interpreted as operating on rationals, and division by zero should be avoided.

# # # THIS IS A STUB # # #

Example in Elm:

Result:

Solutions