Question 46
How many NULL child pointers are there in a binary tree with n nodes?
There are 2n child pointers and n-1 non-NULL child links.
How many NULL child pointers are there in a binary tree with n nodes?
There are 2n child pointers and n-1 non-NULL child links.
Which traversal of an expression tree produces prefix notation?
Preorder visits the operator before its operands, producing prefix form.
Which traversal of an expression tree produces infix notation?
Inorder visits left operand, operator, then right operand.
Which traversal of an expression tree produces postfix notation?
Postorder visits both operands before the operator.
In a min-heap, where is the minimum element stored?
The heap-order property makes the root the minimum.