About 2,000 results
Open links in new tab
  1. Building Heap from Array - GeeksforGeeks

    Oct 18, 2025 · To build a Max Heap from an array, treat the array as a complete binary tree and heapify nodes from the last non-leaf node up to the root in reverse level order.

  2. Heapify | ProCoding

    Explore the concept of heapify with in-depth explanations on converting arrays into min heaps and max heaps.

  3. heapq — Heap queue algorithm — Python 3.14.0 documentation

    2 days ago · To create a heap, use a list initialized as [], or transform an existing list into a min-heap or max-heap using the heapify() or heapify_max() functions, respectively.

  4. Heapify Operation on Heap Data Structure - EnjoyAlgorithms

    Depending on the types of heap property violation at any node, there are two types of heapify operation: 1) Top-down heapify 2) Bottom-up heapify. Understanding these two process are …

  5. Heapify vs Heap-Sort vs Construct Heap - Stack Overflow

    Nov 18, 2021 · Heapify (Construct Heap) is an approach (either top-down or bottom-up), which arranges elements in any array such that, when checked for any index i as parent, its child …

  6. Max-Heapify A Binary Tree | Baeldung on Computer Science

    Mar 18, 2024 · In this tutorial, we’ll discuss a variant of the heapify operation: max-heapify. We’ll discuss how to perform the max-heapify operation in a binary tree in detail with some examples.

  7. Heapify - (Data Structures) - Vocab, Definition, Explanations

    Heapify is the process of transforming a binary tree into a heap data structure, ensuring that the tree maintains the heap property. This property can be either a max-heap or a min-heap, …

  8. Understanding `heapify` in Python: A Comprehensive Guide

    Jan 26, 2025 · The heapify function in Python's heapq module takes a list and rearranges its elements in-place to form a heap. It does this by comparing and swapping elements in such a …

  9. Introduction to Min-Heap - GeeksforGeeks

    Oct 18, 2025 · The heapify operation is used to place an element in its correct position within the heap so that the heap property is maintained.A heapify operation can also be used to create a …

  10. How to Heapify a Tree in C++ - Built In

    Mar 12, 2025 · A step-by-step tutorial on how to heapify data in C++, including helpful diagrams of heap tree structures and example code for heapifying an array of value.