Exercises
- What will be the time complexity for deleting an arbitrary element from the
min-heap? - What will be the time complexity for finding the
kthsmallest element from themin-heap? - What will be the worst-case time complexity for ascertaining the smallest element from a binary
max-heapand binarymin-heap? - What will be the time complexity to make a
max-heapthat combines twomax-heapeach of sizen? - The level order traversal of
max-heapis12,9,7,4, and2. After inserting new elements1and8, what will be the finalmax-heapand the level order traversal of the finalmax-heap? - Which of the following is a binary
max-heap?


Figure 7.21: Example trees
Join our community on Discord
Join our community’s Discord space for discussions with the author and other readers: https://packt.link/MEvK4
