Help to implement delete_node, get_succ, get_pred, walk, and tree_search in the script following the given structure: #include "bst.h" // --------------------------------------- // Node class // Default constructor Node::Node() { // TODO: Implement this key = 0; parent = nullptr; left = nullptr; right = nullptr; } // Constructor Node::Node(int in) { // TODO: Implement this key = in; parent = nullptr; left = nullptr; right = nullptr; } // Destructor Node::~Node() { // TODO: Implement this delete left; delete right; } // Add parent void Node::add_parent(Node* in) { // TODO: Implement this parent = in; } // Add to left of current node void Node::add_left(Node* in) { // TODO: Implement this left = in; if (in != nullptr) { in->add_parent(this); } } // Add to right of current node void Node::add_right(Node* in) { // TODO: Implement this right = in; if (in != nullptr) { in->add_parent(this); } } // Get key int Node::get_key() { // TODO: Implement this return key; } // Get parent node Node* Node::get_parent() { // TODO: Implement this return parent; } // Get left node Node* Node::get_left() { // TODO: Implement this return left; } // Get right node Node* Node::get_right() { // TODO: Implement this return right; } // Print the key to ostream to // Do not change this void Node::print_info(ostream& to) { to << key << endl; } // --------------------------------------- // --------------------------------------- // BST class // Walk the subtree from the given node void BST::inorder_walk(Node* in, ostream& to) { // TODO: Implement this if (in != nullptr) { inorder_walk(in->get_left(), to); in->print_info(to); inorder_walk(in->get_right(), to); } } // Constructor BST::BST() { // TODO: Implement this root = nullptr; } // Destructor BST::~BST() { // TODO: Implement this delete root; } // Insert a node to the subtree void BST::insert_node(Node* in) { // TODO: Implement this Node* curr = root; Node* par = nullptr; while (curr != nullptr) { par = curr; if (in->get_key() < curr->get_key()) { curr = curr->get_left(); } else { curr = curr->get_right(); } } in->add_parent(par); if (par == nullptr) { root = in; } else if (in->get_key() < par->get_key()) { par->add_left(in); } else { par->add_right(in); } } // Delete a node to the subtree void BST::delete_node(Node* out) { // TODO: Implement this } // minimum key in the BST Node* BST::tree_min() { // TODO: Implement this return get_min(root); } // maximum key in the BST Node* BST::tree_max() { // TODO: Implement this return get_max(root); } // Get the minimum node from the subtree of given node Node* BST::get_min(Node* in) { // TODO: Implement this if (in == nullptr) { return nullptr; } while (in->get_left() != nullptr) { in = in->get_left(); } return in; } // Get the maximum node from the subtree of given node Node* BST::get_max(Node* in) { // TODO: Implement this if (in == nullptr) { return nullptr; } while (in->get_right() != nullptr) { in = in->get_right(); } return in; } // Get successor of the given node Node* BS.