Skip to content
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

Leaves - Bri #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Leaves - Bri #34

wants to merge 2 commits into from

Conversation

brilatimer
Copy link

Heaps Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How is a Heap different from a Binary Search Tree? Heap only lets you provide the max or min values. BST lets you look up if a value exists (its a look-up tool).
Could you build a heap with linked nodes? Yes, the nodes would link 2 children (like the visualization of a binary tree)
Why is adding a node to a heap an O(log n) operation? Because only the height is being traversed.
Was the heap_up & heap_down methods useful? Why? Yes because it allowed me to call it recursively.

heap_sort.rb submission
min_heap.rb submission
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