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

Ida - Fire #34

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

Ida - Fire #34

wants to merge 1 commit into from

Conversation

idago123
Copy link

Heaps Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How is a Heap different from a Binary Search Tree? In a binary tree each level is full except the last, and the last level is filled from left-to-right. In a heap each parent has a specific order-relationship with it's children.
Could you build a heap with linked nodes? Yes
Why is adding a node to a heap an O(log n) operation? The heap-up operation will at worst-case perform 1 swap per level of the heap. Since there are Log n levels to the heap, adding a node is a O(log n) operation.
Were the heap_up & heap_down methods useful? Why? Yes for sorting

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