FirstThis is the first Time implementing a Binary Search Tree, based on how it works from the visualgo website. I made this algorithm purely based on what iI saw, and the remove method was quite challenging. How can iI improve the speed/efficiency and make the code look better?
Inorder: basically an inorder traversal through the BST Ex: 1 3 4 6 19 25
Insert: inserts a node with a certain value
lookup: returns the value if it exists in the bst else returns None
getMin: returns the min value in the specified node
remove: removes a value, and if current_node is not specified then, it starts from the root node, a bit recursive, even though i wanted to implement a way without recursion, but i couldn't see it working without it in any way.
- Inorder: basically an inorder traversal through the BST Ex: 1 3 4 6 19 25
- Insert: inserts a node with a certain value
- lookup: returns the value if it exists in the BST else returns None
- getMin: returns the min value in the specified node
- remove: removes a value, and if current_node is not specified then, it starts from the root node, a bit recursive, even though I wanted to implement a way without recursion, but I couldn't see it working without it in any way.