Skip to content

Conversation

@Suhaani-19
Copy link

What type of PR is this? (check all applicable)

  • [βœ…] πŸš€ Added Name
  • [βœ…] ✨ Feature
  • 🌟 stared the repo
  • πŸ› Grammatical Error
  • πŸ“ Documentation Update
  • 🚩 Other

Description

This PR adds a new Python program demonstrating insertion in both Min Heap and Max Heap using the heapq module.
It includes clear, commented code that explains how heaps work internally in Python β€” where a Min Heap is implemented by default and a Max Heap is simulated using negated values.

The script contains:

Functions for inserting elements in both heaps

Example demo section with test values

Clean and readable output showing both heap structures

This contribution enhances the repository by adding a classic data structure algorithm in an easy-to-understand format for beginners.

Add Link of GitHub Profile

https://github.com/Suhaani-19

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