A community for technology geeks in Lebanon.

You are not logged in.

- Topics: Active • Unanswered

Pages: **1**

**arithma****Member**

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!

*Last edited by arithma (October 13 2010)*

**Joe****Member**

I confirm the Polish calculation.

Good exercise ^^

**Padre****Member**

is brute force considered an approach ?

Pages: **1**