The post-order traversal of a binary tree is O P Q R S T. Then possible pre-order traversal will be . . . . . . . .
A. T Q R S O P
B. T O Q R P S
C. T Q O P S R
D. T Q O S P R
Select an option to see the answer and solution.
How many top trees are there in a tree with single vertex?
Select an option to see the answer and solution.
What is the speciality of cartesian sorting?
A. it sorts partially sorted set of data quickly
B. it considers cartesian product of elements
C. it sorts elements in less than O(logn)
D. it is a self balancing tree
Select an option to see the answer and solution.
Consider the below left-left rotation pseudo code where the node contains value pointers to left, right child nodes and a height value and Height() function returns height value stored at a particular node.
avltree leftrotation(avltreenode z):
avltreenode w =x-left
x-left=w-right
w-right=x
x-height=max(Height(x-left),Height(x-right))+1
w-height=max(missing)+1
return w
What is missing?
A. Height(w-left), x-height
B. Height(w-right), x-height
C. Height(w-left), x
D. Height(w-left)
Select an option to see the answer and solution.
In which of the following self - balancing binary search tree the recently accessed element can be accessed quickly?
A. AVL tree
B. AA tree
C. Splay tree
D. Red - Black tree
Select an option to see the answer and solution.
Which operation is used to break a preferred path into two sets of parts at a particular node?
A. Differentiate
B. Cut
C. Integrate
D. Join
Select an option to see the answer and solution.
What does the below definations convey?
i. A binary tree is balanced if for every node it is gonna hold that the number of inner nodes in the left subtree and the number of inner nodes in the right subtree differ by at most 1.
ii. A binary tree is balanced if for any two leaves the difference of the depth is at most 1.
A. weight balanced and height balanced tree definations
B. height balanced and weight balanced tree definations
C. definations of weight balanced tree
D. definations of height balanced tree
Select an option to see the answer and solution.
Which of the following is not an advantage of trees?
A. Hierarchical structure
B. Faster search
C. Router algorithms
D. Undo/Redo operations in a notepad
Select an option to see the answer and solution.
What is a full binary tree?
A. Each node has exactly zero or two children
B. Each node has exactly two children
C. All the leaves are at the same level
D. Each node has exactly one or two children
Select an option to see the answer and solution.
Which of the following graph traversals closely imitates level order traversal of a binary tree?
A. Depth First Search
B. Breadth First Search
C. Depth & Breadth First Search
D. Binary Search
Select an option to see the answer and solution.
Which special balanced binary search tree is used to store the nodes of auxiliary tree?
A. Red - Black Tree
B. Red - Brown Tree
C. Red - Yellow Tree
D. Red - Tango Tree
Select an option to see the answer and solution.
General ordered tree can be encoded into binary trees.
Select an option to see the answer and solution.
What is the time complexity of for achieving competitive ratio by tango tree?
A. O (log n)
B. O (n2 )
C. O (n!)
D. O (log (log n))
Select an option to see the answer and solution.
What is/are the disadvantages of implementing tree using normal arrays?
A. difficulty in knowing children nodes of a node
B. difficult in finding the parent of a node
C. have to know the maximum number of nodes possible before creation of trees
D. difficult to implement
Select an option to see the answer and solution.
What is the speciality about the inorder traversal of a binary search tree?
A. It traverses in a non increasing order
B. It traverses in an increasing order
C. It traverses in a random fashion
D. It traverses based on priority of the node
Select an option to see the answer and solution.
The number of edges from the root to the node is called . . . . . . . . of the tree.
A. Height
B. Depth
C. Length
D. Width
Select an option to see the answer and solution.
A binary search tree contains values 7, 8, 13, 26, 35, 40, 70, 75. Which one of the following is a valid post-order sequence of the tree provided the pre-order sequence as 35, 13, 7, 8, 26, 70, 40 and 75?
A. 7, 8, 26, 13, 75, 40, 70, 35
B. 26, 13, 7, 8, 70, 75, 40, 35
C. 7, 8, 13, 26, 35, 40, 70, 75
D. 8, 7, 26, 13, 40, 75, 70, 35
Select an option to see the answer and solution.
In a binary search tree, which of the following traversals would print the numbers in the ascending order?
A. Level-order traversal
B. Pre-order traversal
C. Post-order traversal
D. In-order traversal
Select an option to see the answer and solution.
What must be the ideal size of array if the height of tree is 'l'?
Select an option to see the answer and solution.
For the tree below, write the post-order traversal.
A. 6, 2, 7, 2, 5, 11, 9, 5, 4
B. 6, 5, 11, 2, 7, 5, 9, 4, 2
C. 6, 5, 2, 11, 7, 4, 9, 5, 2
D. 6, 2, 7, 2, 11, 5, 5, 9, 4
Select an option to see the answer and solution.