0% found this document useful (0 votes)
11 views

Assignment - 2_ Attempt review-1

..d.d..d.d..ddd.

Uploaded by

raahulraaaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Assignment - 2_ Attempt review-1

..d.d..d.d..ddd.

Uploaded by

raahulraaaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

11/18/24, 3:33 PM Assignment - 2: Attempt review

Started on Thursday, 19 September 2024, 8:32 PM


State Finished
Completed on Thursday, 19 September 2024, 8:40 PM
Time taken 7 mins 48 secs
Grade 10.00 out of 10.00 (100%)

Question 1

Correct

Mark 2.00 out of 2.00

Consider the following AVL tree.

Which of the following order of elements are inserted into an empty AVL tree,
so that it is possible to get the above AVL tree?

a. 86, 25, 98, 83, 27, 90, 71, 94 

b. None

c. 94, 71, 86, 25, 98, 83, 27, 90

d. 98, 94, 90, 83, 86, 25, 71, 94

Your answer is correct.

The correct answer is:


86, 25, 98, 83, 27, 90, 71, 94

https://cet.iitp.ac.in/moodle/mod/quiz/review.php?attempt=94588&cmid=1893 1/3
11/18/24, 3:33 PM Assignment - 2: Attempt review

Question 2

Correct

Mark 2.00 out of 2.00

In delete operation of binary search tree, we need inorder successor (or


predecessor) of a node when a node to be deleted where it has both left and
right child. Which of the following is true about inorder successor needed in
delete operation?

a. Inorder successor maybe an ancestor of the node.

b. Inorder successor is always either leaf node or a node with empty


right child.

c. Inorder successor is always either a leaf node or a node with 


empty left child.

d. Inorder successor is always a leaf node.

Your answer is correct.

The correct answer is:


Inorder successor is always either a leaf node or a node with empty left child.

Question 3

Correct

Mark 2.00 out of 2.00

The Average case occur in linear search algorithm

a. When Item is the last element in the array or is not there at all

b. When Item is not in the array at all

c. When Item is the last element in the array

d. When Item is somewhere in the middle of the array 

Your answer is correct.

The correct answer is:


When Item is somewhere in the middle of the array

https://cet.iitp.ac.in/moodle/mod/quiz/review.php?attempt=94588&cmid=1893 2/3
11/18/24, 3:33 PM Assignment - 2: Attempt review

Question 4

Correct

Mark 2.00 out of 2.00

The following numbers are inserted into an empty binary search tree in the
given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the
height is the maximum distance of a leaf node from the root)?

a. 5

b. 4

c. 3

d. 2

Your answer is correct.

The correct answer is:


3

Question 5

Correct

Mark 2.00 out of 2.00

Which of the following operations are used by Red-Black trees to maintain


balance during insertion/deletion?

a) Recoloring of nodes
b) Rotation (Left and Right)

a. Only a

b. Only b

c. Both a and b 

d. Neither a nor b

Your answer is correct.


The correct answer is:
Both a and b

https://cet.iitp.ac.in/moodle/mod/quiz/review.php?attempt=94588&cmid=1893 3/3

You might also like