Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
creasyw committed Aug 24, 2011
1 parent 03d3a29 commit 8cf37c9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ioventures/README
@@ -0,0 +1,17 @@
Question Description

You are given a prefix expression. Write a program to evaluate it.
Input

The first argument will be an input file with one prefix expression per line. e.g.

* + 2 3 4

Your program has to read this and insert it into any data structure you like. Traverse that data structure and evaluate the prefix expression. Each token is delimited by a whitespace. You may assume that the only valid operators appearing in test data are '+','*' and '/'


Output

Print to stdout, the output of the prefix expression, one per line. e.g.

20

0 comments on commit 8cf37c9

Please sign in to comment.