Skip to content

feat(data-structure): Add Min Binary Heap implementation in C#1526

Closed
Vedanth-Rach wants to merge 1 commit into
TheAlgorithms:masterfrom
Vedanth-Rach:feature/min-binary-heap
Closed

feat(data-structure): Add Min Binary Heap implementation in C#1526
Vedanth-Rach wants to merge 1 commit into
TheAlgorithms:masterfrom
Vedanth-Rach:feature/min-binary-heap

Conversation

@Vedanth-Rach
Copy link
Copy Markdown

Fixes #1497

Description of Change

This Pull Request introduces a complete implementation of a Min Binary Heap data structure in C, utilizing dynamic array representation and proper memory management (malloc/free).

The file is located at data_structures/binary_tree_in_c/Min Binary Heap.c.

Implementation Details
Memory Management:** Dynamic allocation for the underlying array and heap structure.
Core Logic:** Implements heapify_up (for insertion) and heapify_down (for extraction) to maintain the Min Heap property.
Demonstration:** Includes a main() function demonstrating all operations and memory cleanup.

⚙️ Supported Operations & Complexity

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

References

No specific external references needed.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass (Included in the main function)
  • Relevant documentation/comments is changed or added (Added extensive function documentation and header comments)
  • PR title follows semantic commit guidelines (The title should be feat(data-structure): Add Min Binary Heap implementation in C)
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Implements the requested Min Binary Heap data structure.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 6, 2025

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Dec 6, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions Bot closed this Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant