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

bst.go tree.Delete() function mistake? #13

Open
WuShaoQiang opened this issue Apr 16, 2019 · 2 comments
Open

bst.go tree.Delete() function mistake? #13

WuShaoQiang opened this issue Apr 16, 2019 · 2 comments

Comments

@WuShaoQiang
Copy link

if parent.Left == n {

I think it should be

if parent.Left == h

n is never gonna equal to parent.Left right?, they don't have the same address. We only use n pass to function Compare to determine which way should we go in the tree.

@WuShaoQiang
Copy link
Author

If I miss something, please point it out to me. Thanks

@Mohammadjafari80
Copy link

You are actually right. it may cause incorrect modifications.
#15

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

No branches or pull requests

2 participants