Refractor Binary Search Tree to mordern C++ using STL and OOP#3110
Refractor Binary Search Tree to mordern C++ using STL and OOP#3110shreyash24-tech wants to merge 1 commit intoTheAlgorithms:masterfrom
Conversation
|
This PR refactors the existing Binary Search Tree implementation to modern C++ style as mentioned in the TODO comment in the original file. The previous version used a C-style struct design with global variables and a manual queue implementation. In this update, I converted the implementation into a proper class-based structure, removed the global queue, and replaced it with std::queue from STL. I also corrected the deletion logic to properly handle root deletion and all BST delete cases. Additionally, I replaced NULL with nullptr, improved memory management by adding a destructor, and enhanced overall code readability and safety. The functionality of the BST remains the same, but the structure now follows modern C++ practices. |
|
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions! |
Description of Change
Checklist
Notes: