
CPS02-Day3-NWC -Set02
Authored by CCC info@ccc.training
English
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the traversal strategy used in the binary tree?
depth-first traversal
breadth-first traversal
random traversal
Priority traversal
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What are the children for node ‘w’ of a complete-binary tree in an array representation?
2w and 2w+1
2+w and 2-w
w+1/2 and w/2
w-1/2 and w+1/2
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider a situation of writing a binary tree into a file with memory storage efficiency in mind, is array representation of tree is good?
yes because we are overcoming the need of pointers and so space efficiency
yes because array values are indexable
No it is not efficient in case of sparse trees and remaning cases it is fine
No linked list representation of tree is only fine
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the parent for a node ‘w’ of a complete binary tree in an array representation when w is not 0?
floor(w-1/2)
ceil(w-1/2)
w-1/2
w/2
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed?
Yes just traverse through the array and form the tree
No we need one more traversal to form a tree
No in case of sparse trees
Yes by using both inorder and array elements
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If the tree is not a complete binary tree then what changes can be made for easy access of children of a node in the array?
every node stores data saying which of its children exist in the array
no need of any changes continue with 2w and 2w+1, if node is at i
keep a seperate table telling children of a node
use another array parallel to the array with tree
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many children does a binary tree have?
2
any number of children
0 or 1 or 2
0 or 1
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?