#Something wrong with my binary search tree algorithms?

13 messages · Page 1 of 1 (latest)

tribal zinc
#

I've been working on this binary tree assignment for about 20 hours now. Using print statements, from what I gathered my algorithms work on only a few test cases, but the testing script runs 900k tests and somewhere in those tests my remove algorithm gets caught in infinite recursion.

young starBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

tribal zinc
#

I'm going to post the repo

#

I'll pick this back up in the morning.

hot bison
#

Your code won't even run for me, bst_remove, looks as though you are not initializing data properly

#

If you use an address sanitizer it should show you any issues

tribal zinc
#

looked into sanitizer but unsure how to implement/install, however I found the bug

#

i was using old_bst_root as an umbrella solution for all common cases, when the 2 children case would call bst_remove_max which would handle the deletion on its own.

woven tiger
#

@tribal zinc you got it working?

tribal zinc
#

yeah

#

just pushed it to the repo

#

!solved