[PR #1514] [CLOSED] aaded binary-heap-implementation.c #2119

Open
opened 2026-01-29 15:28:59 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1514
Author: @AayanSayyed
Created: 10/26/2025
Status: Closed

Base: masterHead: issue1496-binary-heap-algo


📝 Commits (1)

  • 81aee5b aaded 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:

Operation Time Complexity
Insert O(log n)
Extract Min O(log n)
Search O(n)
Get Min (Peek) O(1)
Display O(n)

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.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1514 **Author:** [@AayanSayyed](https://github.com/AayanSayyed) **Created:** 10/26/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `issue1496-binary-heap-algo` --- ### 📝 Commits (1) - [`81aee5b`](https://github.com/TheAlgorithms/C/commit/81aee5b8dafb7607c529bc94cd19f3107eb43764) aaded binary-heap-implementation.c ### 📊 Changes **1 file changed** (+152 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `data_structures/binary_trees/binary_heap_implimentation.c` (+152 -0) </details> ### 📄 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: Operation | Time Complexity -- | -- Insert | O(log n) Extract Min | O(log n) Search | O(n) Get Min (Peek) | O(1) Display | O(n) 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:28:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2119