NAT1 mark
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is _________. (*answer in integer*)
Numerical answer
GATE CSE previous year questions · Programming & Data Structures
Numerical answer
Single correct
Numerical answer
T S
I: Inorder L: left subtree, node, right subtree
II: Preorder M: node, left subtree, right subtree
III: Postorder N: left subtree, right subtree, node
Which one of the following is the correct match from T to S?Single correct
One or more correct
One or more correct
Single correct
Numerical answer
Single correct
typedef struct node {
int val;
struct node *left, *right;
} node;
int foo(node *p) {
int retval;
if (p == NULL)
return 0;
else {
retval = p->val + foo(p->left) + foo(p->right);
printf("%d ", retval);
return retval;
}
}
When foo is called with a pointer to the root node of the given binary tree, what will it print?
Single correct
Answer key coming soon
Numerical answer
Answer key coming soon
Single correct
Answer key coming soon
Numerical answer
Answer key coming soon
Single correct
Answer key coming soon
Single correct
Answer key coming soon
Single correct
Answer key coming soon
Single correct
Numerical answer
Numerical answer
Single correct
Answer key coming soon