Question 11
Infix expression 'A + B * C' when converted to postfix form becomes -
Due to operator precedence, B * C is evaluated first yielding BC*. Then A is added, resulting in ABC*+.
Infix expression 'A + B * C' when converted to postfix form becomes -
Due to operator precedence, B * C is evaluated first yielding BC*. Then A is added, resulting in ABC*+.
What condition occurs when trying to pop an element from an empty stack?
Attempting to delete or pop an item from an empty data structure (Stack/Queue) results in a Stack Underflow error.
Condition occurring when trying to insert an element into a completely full static stack is -
Attempting to push an item onto a stack that has reached its maximum allocated memory capacity causes Stack Overflow.
A tree (connected, undirected, and acyclic) with N vertices always has exactly how many edges?
In any connected acyclic tree graph containing N nodes, the total number of edges is always N - 1.
Maximum number of nodes in a binary tree of height 'h' (where root is at height 1) is -
$A complete full binary tree of height h contains 2^0 + 2^1 + ... + 2^{h-1} = 2^h - 1 maximum nodes.$