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

Laurel S. - Cedar #41

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

Conversation

paperbackwriter2
Copy link

No description provided.

@chimerror
Copy link

Grabbing this to grade!

Copy link

@chimerror chimerror left a comment

Choose a reason for hiding this comment

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

Good Work!

I added a comment about some commented code and your space complexity calculation for height, but this is good enough for a Green!

# Time Complexity:
# Space Complexity:
# def add(self, key, value = None):
# # base case
# if not current.left and not current.right:

Choose a reason for hiding this comment

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

Not a big deal, but generally I recommend removing unfinished but uncommented code like this to just keep the source clean as a style thing.



# Time Complexity: O(n) and n = # of nodes in BST
# Space Complexity: O(n) ? not sure on this one

Choose a reason for hiding this comment

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

Good news, neither are the instructors, because as I was doing this grading I realized our instructor solution was wrong on these calculations! In this case as there is no additional space allocated, I would consider this O(1).

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