Multiple choice

Consider the infix expression ((a + b * c))* d + e * (f + g). If the expression tree is drawn, how many nodes are there in the right subtree of root?

  1. 5

  2. 6

  3. 7

  4. 8

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The expression is ((a + b * c)) * d + e * (f + g). The right subtree of the root (+) is e * (f + g). This sub-expression has 5 nodes.