mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-07-10 19:16:54 +00:00
[PR #1514] [CLOSED] aaded binary-heap-implementation.c #2119
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1514
Author: @AayanSayyed
Created: 10/26/2025
Status: ❌ Closed
Base:
master← Head:issue1496-binary-heap-algo📝 Commits (1)
81aee5baaded binary-heap-implementation.c📊 Changes
1 file changed (+152 additions, -0 deletions)
View changed files
➕
data_structures/binary_trees/binary_heap_implimentation.c(+152 -0)📄 Description
Description of Change
This pull request introduces a implementation in C, addressing issue #1496
The Min Binary Heap is a fundamental data structure used to efficiently manage priority queues, scheduling algorithms, and graph-based shortest path computations such as Dijkstra’s algorithm.
The implementation provides clean, modular, and well-documented functions to perform essential heap operations with their optimal time complexities:
The implementation includes:
A dynamic array-based Min Heap
Functions for insertion, extraction, and heap property maintenance and heapifyDown
A sample main() demonstrating usage
Proper memory management and validation checks
References
Fixes issue: #1496
Checklist
Added a detailed description of change
File name : c/data_structure/binary_tree/binary_heap_implimentation.c
File Name Guidelines
Added example and test cases all tests pass successfully Included clear documentation and inline comments
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.