Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

delete() & enhancements in BST #56

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

Merged
ashokdey merged 11 commits into master from problems
Oct 8, 2019
Merged

delete() & enhancements in BST #56

ashokdey merged 11 commits into master from problems
Oct 8, 2019

Conversation

Copy link
Member

@ashokdey ashokdey commented Oct 8, 2019
edited
Loading

🚁 What's inside?

  • remove(value) which is using delete(root, value) at the core in BST
  • Enhancements:
    • replaced insert(root, value) with add(value)
    • replaced preorder(root) with traversePreorder()
    • replaced postorder(root) with traversePostorder()
    • replaced inorder(root) with traverseInorder()
    • replaced search(root, value) with searchFor(value)

🔧 Fixes and Updates

  • fixed delete case of Node having 2 children, thanks @TheSTL for the feedback.
  • getMinimum() using findMinNode(root)
  • getMaximum() using findMaxNode(root)

🕊

SumeetHaryani reacted with hooray emoji
Copy link
Member

@TheSTL TheSTL left a comment

Choose a reason for hiding this comment

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

It doesn't delete the node where found node have left and right child.

ashokdey reacted with hooray emoji
Copy link
Member

@TheSTL TheSTL left a comment

Choose a reason for hiding this comment

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

💯

SumeetHaryani reacted with hooray emoji
@ashokdey ashokdey merged commit fc1f466 into master Oct 8, 2019
@ashokdey ashokdey deleted the problems branch October 8, 2019 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@TheSTL TheSTL TheSTL approved these changes

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /