No student devices needed. Know more
20 questions
In preorder traversal of a binary tree the second step is ____________
traverse the right subtree
traverse the left subtree
traverse right subtree and visit the root
visit the root
Given a sequence of number below:
50,60,40,70,45,55,30,80,65,35,25,75,85
When creating a binary search tree, what is the height of the tree?
3
4
5
6
How many leaf are there in the tree?
1
3
4
7
Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?
5,15,27,34,47,54,63,70,72,75,83,85,88,94,99,101
72,54,34,5,27,15,47,63,70,83,75,88,85,101,94,99
15,27,5,47,34,70,63,54,75,85,99,94,101,88,83,72
15,27,5,47,34,63,54,70,75,85,99,94,101,88,83,72
none of the above
What is the value of the ROOT node in this Tree?
35
24
42
20
Root
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?
Pre-Order
In-Order
Post-Order
Monastic Orders
A list must be in order for a Binary search to take place
True
False
If a node having two children is to be deleted from binary search tree, it is replaced by its
Inorder predecessor
Inorder successor
Preorder predecessor
Preorder successor
The run time complexity for traversing all the nodes of a binary search tree with n nodes and printing them in an order is
O (n log n)
O (n)
O (n/2)
O (log n)
A threaded binary tree is a binary tree in which every node that does not have right child has a thread to its
Preorder successor
Inorder successor
Inorder predecessor
Postorder successor
A binary search tree is generated by inserting in order the following integers:
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24
The number of the node in the left sub-tree and right sub-tree of the root, respectively, is
(4, 7)
(7, 4)
(8, 3)
(3, 8)
What is the preorder traversal of the given binary tree?
A B D E H I J K L C F G
A B D H I E J K C F L G
H D I B J E K A L F C G
H I D J K E B L F G C A
What is the postorder traversal of the given binary tree?
H D I B J E K A L F C G
H I D J K E B L F A C G
H I D J K E B L F G C A
A B C D H I E J K F L G
In a ____, for any node 'n' every descendant node's value in the left subtree is less than n and in the right subtree is greater than n.
Binary Tree
Binary Search Tree
AVL Tree
Binary Heap Tree
The ____ of a Binary Search Tree starts by visiting the current node, then its left child node and then its right child node.
Pre-Order Traversal
In-Order Traversal
Post-Order Traversal
Linear Order Traversal
When traversing a binary tree, which diagram is pre-order?
Explore all questions with a free account