Programming, Data Structures And Algorithms Using Python Week 6 Programming Assignment Solutions

## Programming, Data Structures And Algorithms Using Python Week 6 Programming Assignment Answers 2023

**1. Suppose u and v both have values of type set and are disjoint. Which of the following expressions evaluates to True?**u == v | (u^v)

u == (v^u)

u == v^(u | v)

u == u^(v | u)

Answer :-For AnswerClick Here

**2. Suppose u and v both denote sets in Python. What is the most general condition that guarantees that u|v == u^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 AnswerClick Here

**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?**27

15

58

51

Answer :-For AnswerClick Here

**4. Consider the min-heap [13, 24, 32, 32, 41, 38, 50, 48, 40] built by repeatedly inserting values into an empty heap. Suppose the last value inserted was 24. What was the heap structure before this value was inserted?**[13, 32, 32, 41, 40, 38, 50, 48]

[13, 41, 32, 40, 32, 38, 50, 48]

[13, 32, 32, 48, 41, 38, 50, 40]

[13, 32, 32, 40, 41, 38, 50, 48]

Answer :-For AnswerClick Here