Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Postfix traversal to generate code


1. Postfix traversal to generate code

2. Stack-based code
Expression tree for (X & Y) | ((! X) & (! Y))Let us use our running logical expression example to do a traversal through the tree to generate a code list. The actions are similar to that of a postfix traversal though the tree.
( X & Y ) | ( ( ! X ) & ( ! Y ) )

Here is the JavaScript code.

Here is the output of the JavaScript code.


3. End of page