Consider two binary operators ‘ ‘ and ‘‘ with the precedence of operator being lower than that of the operator. Operator is right associative while… Read More
Tag Archives: Data Structures-Tree Traversals
Which of the following pairs of traversals is not sufficient to build a binary tree from the given traversals? (A) Preorder and Inorder (B) Preorder… Read More
What does the following function do for a given binary tree? int fun(struct node *root) { if (root == NULL) return 0; if (root->left ==… Read More
The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g,… Read More
What is common in three different types of traversals (Inorder, Preorder and Postorder)? (A) Root is visited before right subtree (B) Left subtree is always… Read More
Following function is supposed to calculate the maximum depth or height of a Binary tree — the number of nodes along the longest path from… Read More
Courses