Please comment if you find any answer wrong or if there is any discrepancy. Thanks! 🙂 Here, we aim to please 😀


1) Suppose u and v both denote sets in Python. Under what condition can we guarantee that u - (u - v) == v?

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

Answer(s) : 
c) The set v should be a subset of the set u

2) Suppose u and v both denote sets in Python. Under what condition can we guarantee that u|v == u^v?

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

Answer(s) : 
a) The sets u and v should be disjoint 


3) Suppose we insert 97 into the max heap [98,67,89,38,42,54,89,17,25]. What is the resulting heap?

Answer(s) : 
[98,97,89,38,67,54,89,17,25,42]

4) Suppose we we apply delete_max() twice to the heap [100,97,93,38,67,54,93,17,25,42]. What is the resulting heap?

Answer(s) : 
[93,67,93,38,42,54,25,17]


Categories: NPTEL solution

1 Comment

Mahesh · March 26, 2018 at 2:29 PM

Bro post the answer for week 7 quiz bro

Leave a Reply

Your email address will not be published. Required fields are marked *