Skip to content

Conversation

starseed2021
Copy link

Heaps Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How is a Heap different from a Binary Search Tree?
Could you build a heap with linked nodes?
Why is adding a node to a heap an O(log n) operation?
Were the heap_up & heap_down methods useful? Why?

Copy link

@kyra-patton kyra-patton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tiffany, I'm grading this project as a yellow since the time and space complexities were left blank as were the comprehension questions.

A yellow is a passing score so resubmission is not required, however if you would like a green score, please resubmit with the Big O and comprehension questions completed.

🟡

Comment on lines 6 to 7
Time Complexity: ?
Space Complexity: ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ But what about time and space complexity?

the heap property is reestablished.
"""
pass
heap = self.store

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 70 to 71
Time complexity: ?
Space complexity: ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Implementation works but what about time and space complexity?



def empty(self):
""" This method returns true if the heap is empty

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Implementation works but what about time and space complexity?

Comment on lines 36 to 37
Time Complexity: ?
Space Complexity: ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Implementation works but what about time and space complexity?

Comment on lines 22 to 23
Time Complexity: ?
Space Complexity: ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Implementation works but what about time and space complexity?

@@ -1,8 +1,18 @@
from min_heap import MinHeap

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from min_heap import MinHeap
from heaps.min_heap import MinHeap

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.

2 participants