joeyajames/Python

Updation in MaxHeap.py

Opened this issue · 0 comments

Naming Conventions: Renamed private methods to follow Python's naming conventions (snake_case).

Returning None: Changed the return value of peek and pop methods to None instead of False for clarity. In Python, None is typically used to indicate the absence of a value.

Use of Dummy Element: Initialized the heap with a dummy element at index 0 to simplify index calculations. This helps in avoiding special cases in the code.

Output Formatting: Changed the output printing to exclude the dummy element when printing the heap elements.