Skip to content

Leaves - Mariya #27

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 1 commit into
base: master
Choose a base branch
from
Open

Leaves - Mariya #27

wants to merge 1 commit into from

Conversation

M-Burr
Copy link

@M-Burr M-Burr commented Feb 25, 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.

Nice work, you hit the basic learning goals, with some issues on space/time complexity. I.e. you didn't answer them... Check out my comments and let me know if you have any questions.

Comment on lines 30 to 32
# Time Complexity:
# Space Complexity:
def add(key, value)

Choose a reason for hiding this comment

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

space/time complexity?

find_helper(current_node.right, key)
end
end

def find(key)

Choose a reason for hiding this comment

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

space/time complexity?

inorder_helper(current_node.right, list)
return list
end

def inorder

Choose a reason for hiding this comment

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

space/time complexity?


return list
end

def preorder

Choose a reason for hiding this comment

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

space/time complexity?

list << {key: current_node.key, value: current_node.value}
return list
end

def postorder

Choose a reason for hiding this comment

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

space/time complexity?

Comment on lines 112 to +115
# Time Complexity:
# Space Complexity:

def height_helper(current_node)

Choose a reason for hiding this comment

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

space/time complexity?

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