CPS02-Day3-NWC -Set02

CPS02-Day3-NWC -Set02

Professional Development

30 Qs

quiz-placeholder

Similar activities

EF 4th C1 U2 Quick test

EF 4th C1 U2 Quick test

Professional Development

26 Qs

Preposition challenge - G2U2

Preposition challenge - G2U2

Professional Development

25 Qs

Beginner 19

Beginner 19

Professional Development

25 Qs

BE0 - Session 7 Review

BE0 - Session 7 Review

Professional Development

25 Qs

Roadmap B2  Revison Test

Roadmap B2 Revison Test

Professional Development

25 Qs

l2D Fun F air

l2D Fun F air

Professional Development

25 Qs

1st Quiz EPIC - A1

1st Quiz EPIC - A1

Professional Development

26 Qs

Dragon maina legends

Dragon maina legends

Professional Development

26 Qs

CPS02-Day3-NWC -Set02

CPS02-Day3-NWC -Set02

Assessment

Quiz

English

Professional Development

Practice Problem

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?