posted 1 month ago
I'm working on a RedBlack Tree program for a data structures class in college. I'm doing some rotations after insertions, but when I print my tree it is incorrect because I am failing to update the root of the tree when the root is part of the rotation. I want to change the root based on the rotation that occurs inside the method, but I am unsure how to go about doing this. When I try to blatantly set the root inside the method, I get the obvious cannot find symbol error. Any help?