Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Data Structures
→
B And B+ Trees in Data Structures
→
Which of the following tree traversal uses a queue...
1.
Which of the following tree traversal uses a queue data structure?(A) Preorder(B) Inorder(C) Postorder(D) Level order
Answer»
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Which of the following tree traversal uses a queue data structure?(A) Preorder(B) Inorder(C) Postorder(D) Level order
Which of the following cannot generate the full binary tree?(A) Inorder and Preorder(B) Inorder and Postorder(C) Preorder and Postorder(D) None of the above
Consider the following C program segmentstruct CellNode{struct CelINode *leftchild;int element;struct CelINode *rightChild;}int Dosomething(struct CelINode *ptr){int value = 0;if (ptr != NULL){if (ptr->leftChild != NULL)value = 1 + DoSomething(ptr->leftChild);if (ptr->rightChild != NULL)value = max(value, 1 + DoSomething(ptr->rightChild));}return (value);}The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is (GATE CS 2004)(A) The number of leaf nodes in the tree(B) The number of nodes in the tree(C) The number of internal nodes in the tree(D) The height of the tree
The array representation of a complete binary tree contains the data in sorted order. Which traversal of the tree will produce the data in sorted form?(A) Preorder(B) Inorder(C) Postorder(D) Level order
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal. Respectively, of a complete binary tree. Which of the following is always true? (GATE CS 2000)(A) LASTIN = LASTPOST(B) LASTIN = LASTPRE(C) LASTPRE = LASTPOST(D) None of the above
What does the following function do for a given binary tree?int fun(struct node *root){if (root == NULL)return 0;if (root->left == NULL && root->right == NULL)return 0;return 1 + fun(root->left) + fun(root->right);}(A) Counts leaf nodes(B) Counts internal nodes(C) Returns height where height is defined as number of edges on the path from root to deepest node(D) Return diameter where diameter is number of edges on the longest path between any two nodes.
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies