Skip to content

Update MaxHeap.py #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ivanho-git
Copy link

Summary

  • Refactored MaxHeap.py to follow Python's naming conventions.
  • Replaced False return values with None for clarity and to better align with Python standards.
  • Used a dummy element at index 0 (None) to simplify index calculations in the heap.
  • Modified output formatting to exclude the dummy element during print.

Changes

  • Functions peek and pop now return None instead of False when the heap is empty.
  • Added clearer naming for internal variables.
  • Applied consistent indentation and structure throughout the file.

Related Issue

Closes #177

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.

issues in temp conversation
1 participant