NPTEL Programming Data Structures And Algorithms Using Python | NPTEL Week 6 Quiz Assignment | NPTEL Assignment Solutions

NPTEL Programming, Data Structures And Algorithms Using Python Week 6 Quiz Assignment | NPTEL Swayam Assignment Answers


programming, data structures and algorithms nptel



MCQs (multiple choice questions) Nptel Week 6 Quiz Answers:

Note:

(1) If the question asks about a value of type string, remember to enclose your answer in single or double quotes.
(2) If the question asks about a value of type list, remember to enclose your answer in square brackets and use commas to separate list items.


Q.1: Suppose u and v both have values of type set and are disjoint. Which of the following expressions evaluates to True? Options are:

(a) u == v | (u^v)
(b) u == (v^u)
(c) u == v^(u | v)
(d) u == u^(v | u)

Answer is (c) u == v^(u | v)


Q.2: Suppose u and v both denote sets in Python. What is the most general condition that guarantees that u|v == u^v? Options are:

(a) The sets u and v should be disjoint.
(b) The set u should be a subset of the set v.
(c) The set v should be a subset of the set u.
(d) This is true for any u and v.

Answer is (a) The sets u and v should be disjoint.


Q.3: Consider the min-heap [15, 27, 33, 39, 66, 39, 47, 58, 51]. built by repeatedly inserting values into an empty heap. Which of the following could not have been the last element inserted into this heap? Options are:

(a) 27
(b) 15
(c) 58
(d) 51

Answer is (c) 58.


Q.4: Suppose we execute delete-min twice on the min-heap [13,29,24,67,52,89,45,98.79,58]. What is the resulting heap? 

Answer
is: [29,52,45,67,79,89,58,98]


If you are facing any queries regarding this assignment solutions, then please drop comment in comment section.

Post a Comment

0 Comments