NPTEL Programming, Data Structures And Algorithms Using Python Week 6 Assignment Answers 2025

NPTEL Programming, Data Structures And Algorithms Using Python Week 6 Assignment Answers 2025

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

  • The sets u and v should be disjoint.
  • The set u should be a subset of the set v
  • The set v should be a subset of the set u
  • This is true for any u and v.
Answer :- For Answers Click Here 

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

  • The sets u and v should be disjoint.
  • The set v should be a subset of the set u.
  • The set u should be a subset of the set v.
  • This is true for any u and v.
Answer :- 

3. Which of the following does not correspond to a max-heap on the list of values [19, 28, 29, 31, 31, 45, 55, 72, 83, 97]?

  • [97, 83, 45, 55, 72, 28, 31, 19, 31, 29]
  • [97, 55, 83, 29, 45, 72, 31, 19, 31, 28]
  • [97, 83, 55, 72, 31, 45, 29, 19, 31, 28]
  • [97, 55, 83, 45, 29, 72, 31, 19, 31, 28]
Answer :- 

4. Consider the max-heap [96, 96, 55, 74, 37, 42, 29, 18, 31, 19]. Suppose we apply the operation delete_max() twice to this max-heap. The resulting max-heap is:

  • [74, 37, 55, 19, 31, 42, 29, 18]
  • [74, 37, 55, 31, 19, 29, 42, 18]
  • [74, 37, 55, 31, 18, 42, 29, 19]
  • [74, 37, 55, 31, 19, 42, 29, 18]
Answer :- 
Scroll to Top