Skip to content

Conversation

@AayanSayyed
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant