About 18,500 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

    Heapify is a broader term used to describe the process of converting an entire array into a heap, whether it's a min-heap or a max-heap. Heapify down is a specific operation used to maintain …

  3. heapq — Heap queue algorithm — Python 3.14.2 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. Heap Data Structure - Programiz

    Some of the important operations performed on a heap are described below along with their algorithms. Heapify is the process of creating a heap data structure from a binary tree. It is …

  5. 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 …

  6. 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 …

  7. Understanding Heapify in Java - javaspring.net

    Nov 12, 2025 · Heapify is the process of converting an array into a heap data structure. Given an array, heapify rearranges the elements in the array such that it satisfies the heap property.

  8. Heapify Definition - Data Structures Key Term | Fiveable

    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, …

  9. 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.

  10. Heapify - TheAlgorist.com

    This chapter uses Max Heap, but the same concept could be applied on Min Heap as well by simple tweaking of logic. At the very outset, even before going into more details, I want to …