-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: master
Are you sure you want to change the base?
Conversation
Grabbing this to grade! |
There was a problem hiding this 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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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).
No description provided.