Also, a way of doing math. Normal people do math in infix notation, which results in problems with operator precedence and introduces the need for parentheses. Infix looks like this:

(2 + 3) * 5

Prefix would look like this:

* + 2 3 5

If we put the infix expression into a binary tree, we can get the prefix equivalent by traversing the tree like so:

  1. Write down the number or symbol at the current node.
  2. Go to the left node and recurse.
  3. Go to the right node and recurse.

I'm not up on prefix notation, so I can't really say what the benefits of it are. I know that LISP uses it to some degree. But I don't have much LISP experience either, so I might be talking out my ass. Maybe someone who knows this better can elaborate? Compare to my postfix node, which has a lot more information about all this. In general, prefix is the same idea as postfix only in reverse.