NPTEL » Programming, Data Structures And Algorithms Using Python

Week 6 Quiz

Due date: 2019-09-11, 23:59 IST.
Your last recorded submission was on 2019-09-11, 15:49 IST
All questions carry equal weightage. All Python code is assumed to be executed using Python3. You may submit as many times as you like within the deadline. Your final submission will be graded.
Note:
  • If the question asks about a value of type string, remember to enclose your answer in single or double quotes.
  • 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.
2.5 points
Suppose u and v both denote sets in Python. Under what condition can we guarantee that u - (u - v) == v?
 
 
 
 
2.5 points
Suppose u and v both denote sets in Python. Under what condition can we guarantee that u|v == u^v?
 
 
 
 
Suppose we insert 97 into the max heap [98,67,89,38,42,54,89,17,25]. What is the resulting heap?
[98,97,89,38,67,54,89,17,25,42]
2.5 points
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?
[93,67,93,38,42,54,25,17]

1 comment

JavaFX Scene Builder

  This is an article about the JavaFX Scene Builder. You will get a short introduction about the installation and usage of the software. The...