Skip to content

Conversation

@theomoondev
Copy link

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.

Excellent work Lee, you hit all the requirements. Very well done.

Comment on lines +20 to 22
# Time Complexity: O(log n) for balanced trees, O(n) for unbalanced trees; where n is the number of nodes
# Space Complexity: O(n), where n is the height
def add(key, value)

Choose a reason for hiding this comment

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

👍

Comment on lines +38 to +40
# Time Complexity: O(log n) for balanced trees, O(n) for unbalanced trees; where n is the number of nodes
# Space Complexity: O(n), where n is the height
def find(key, current = @root)

Choose a reason for hiding this comment

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

👍

Comment on lines +47 to 49
# Time Complexity: O(n), where n is the number of nodes
# Space Complexity: O(n), where n is the height
def inorder

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 72
# Time Complexity: O(n), where n is the number of nodes
# Space Complexity: O(n), where n is the height
def preorder

Choose a reason for hiding this comment

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

👍

Comment on lines +93 to 95
# Time Complexity: O(n), where n is the number of nodes
# Space Complexity: O(n), where n is the height
def postorder

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), where n is the number of nodes
# Space Complexity: O(n), where n is the height
def height(current = @root, height = 0)

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