• Coding
  • Exercise - Polish Calculator Extra

http://www.lebgeeks.com/forums/viewtopic.php?id=7560
Addendum:
Given a specific desired result, and a list of operations and numbers, order the operations and numbers so that the computation will match the result.

History: I succesfully implemented this to win a competition on tv where you are given numbers and operators to match a result, but was too satisfied when it worked to care to participate in the competition.

[edit]
Example:
result: 15
operations: + *
1 2 5

The algorithm should return: 1 2 + 5 *
result: 30
operations: * * * /
2 5 10 3 10

Possible return: 2 5 * 10 / 3 * 10 *
I need someone to double check my polish calculations!
I confirm the Polish calculation.

Good exercise ^^
is brute force considered an approach ? :P