CPS02-Day3-NWC -Set02

CPS02-Day3-NWC -Set02

Professional Development

30 Qs

quiz-placeholder

Similar activities

christmas words

christmas words

KG - Professional Development

33 Qs

Travelling

Travelling

Professional Development

25 Qs

CPS02-Day2-NWC -Set01

CPS02-Day2-NWC -Set01

Professional Development

30 Qs

Technical Skills- End  Examin - 13-01-2024 ECE & EEE SEM V

Technical Skills- End Examin - 13-01-2024 ECE & EEE SEM V

Professional Development

25 Qs

taylors

taylors

1st Grade - Professional Development

25 Qs

TỪ LOẠI NOUN SUB 2 (NOUN TỪ GHÉP)

TỪ LOẠI NOUN SUB 2 (NOUN TỪ GHÉP)

Professional Development

29 Qs

STRUCTURE 5-PASSIVE VOICE

STRUCTURE 5-PASSIVE VOICE

9th Grade - Professional Development

30 Qs

GIS DAY QUIZ 2021: Prelims

GIS DAY QUIZ 2021: Prelims

University - Professional Development

26 Qs

CPS02-Day3-NWC -Set02

CPS02-Day3-NWC -Set02

Assessment

Quiz

English

Professional Development

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?