Digital Marketing

Max-Heap vs Min-Heap

  • Max-Heap: In a Max-Heap the root node key is the greatest of all the keys in the heap. It should be ensured that the same property is true for all the subtrees in the heap recursively.
  • Min-Heap: In the case of a Min-Heap, the root node key is the smallest or minimum among all the other keys present in the heap. As in Max heap, this property should be recursively true in all the other subtrees in the heap.

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database