Skip to content

Conversation

@adeet1
Copy link

@adeet1 adeet1 commented Jan 1, 2020

This pull request improves the print() method in binary_heap.cpp by printing the heap as a tree instead of as an array, making it easier to visualize the heap.

createTree() is a helper method, which iterates through each element in the heap array to create a binary tree from the array.

Notes:

  1. The print functionality itself is taken from lab 5.
  2. Please ignore commit 05dc0cb, as it is a duplicate of the commit in the previous pull request.

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