Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.
This project is maintained by chankruze
Find which math expression matches the answer that you are given, if you have an integer answer, and a list of math expressions.
Test each math expression to find the first one that matches the answer that you are given.
Two inputs: an integer and a space separated string of math expressions. The following operations need to be supported: addition +, subtraction -, multiplication *, division /.
An expression can include multiple operations.
A string that tells the index of the first math expression that matches. If there are no matches, output ‘none’.
15
(2+100) (5*3) (14+1)
index 1
Index counting starts at 0, so (5*3) is at index 1 and matches your answer of 15.
Language | Solution |
---|---|
C | not available |
CPP | not available |
C# | not available |
Python | available |
Java | not available |
Ruby | not available |
Swift | not available |