229 views

3 Answers

1 1 vote

Prefix expression:

$\texttt{+ * 2 3 / 8 4}$

This represents the expression tree:

Postfix means postorder traversal:

Left $\rightarrow$ Right $\rightarrow$ Root

Left subtree $\texttt{* 2 3}$ becomes:

$\texttt{2 3 *}$

Right subtree $\texttt{/ 8 4}$ becomes:

$\texttt{8 4 /}$

Then the root $\texttt{+}$ comes at the end.

So the postfix expression is:

$\texttt{2 3 * 8 4 / +}$

Correct Option: A

Answer:
Position:
Show:

Related questions

8 8 votes
3 3 answers
273
273 views
GO Classes asked Jul 9
273 views
Consider the following postfix expression:$\texttt{1 2 3 + 4 5 * * +}$Which of the following fully parenthesized infix expressions is equivalent to it?$\texttt{( 1 + ( ( ...
5 5 votes
2 2 answers
186
186 views
6 6 votes
3 3 answers
227
227 views
GO Classes asked Jul 9
227 views
Convert the following fully parenthesized infix expression into postfix form:$\texttt{( 2 + ( ( 3 + 4 ) * ( 5 * 6 ) ) )}$Which of the following is the correct postfix exp...
7 7 votes
2 2 answers
194
194 views
GO Classes asked Jul 9
194 views
For the expression:$\texttt{2 * 3 + 8 / 4}$Assume the expression tree has $\texttt{+}$ as the root, $\texttt{*}$ as the left subtree root, and $\texttt{/}$ as the right s...