Post

PythonPython

n
naveen nani

Posted on 27th February 2024|47 views

0
votes

Max Heap Python

What is a max heap?

Answers
P
kavya A

Posted on 27th February 2024

It is the complete binary tree within which each value in every internal node is >= to the values within the children of this node.

Mapping the elements of a heap within an array implies trivial, if any node is saved an index k, later its left child is saved at index 2k + 1 also its right child is saved at index 2k + 2.

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos