Skip to content

Space - Nikki V #21

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

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

Space - Nikki V #21

wants to merge 3 commits into from

Conversation

vnikki13
Copy link

@vnikki13 vnikki13 commented Sep 1, 2020

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nikki, well done, you hit all the learning goals here. Nice work!

Comment on lines +19 to +21
# Time Complexity: best case O(log n) / worst case O(n)
# Space Complexity: O(n)
def add_helper(current, new_node)

Choose a reason for hiding this comment

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

👍 , your space complexity is correct if the tree is unbalanced.

Comment on lines +45 to 47
# Time Complexity: best case O(log n) / worst case O(n)
# Space Complexity: O(n)
def find(key)

Choose a reason for hiding this comment

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

👍 , your space complexity is correct if the tree is unbalanced.

Comment on lines +62 to +64
# Time Complexity: O(n)
# Space Complexity: O(n)
def inorder_helper(current, order)

Choose a reason for hiding this comment

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

👍

Comment on lines +80 to +82
# Time Complexity: O(n)
# Space Complexity: O(n)
def preorder_helper(current, order)

Choose a reason for hiding this comment

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

👍

Comment on lines +98 to +100
# Time Complexity: O(n)
# Space Complexity: O(n)
def postorder_helper(current, order)

Choose a reason for hiding this comment

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

👍

Comment on lines +116 to +118
# Time Complexity: O(n)
# Space Complexity: O(n)
def height_helper(current)

Choose a reason for hiding this comment

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

👍

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