Question: a little help please you have to implement a Binary Search Tree (BST). Each node has a value. The node in the BST must be greater than or equal to any node in its left subtree, and be smaller than any node in its right sub-tree. All you have to do is finish all TODO parts in BST.cpp and DO NOT modify main.cpp as well as BST.h. The functions are listed

EngineeringComputer ScienceComputer Science questions and answersa little help please
you have to implement a Binary Search Tree (BST). Each
node has a value. The node in the BST must be greater than or equal
to any node in its left subtree, and be smaller than any node in
its right sub-tree.
All you have to do is finish all TODO parts in BST.cpp and DO
NOT modify main.cpp as well as BST.h.
The functions are listedQuestion: a little help please
you have to implement a Binary Search Tree (BST). Each
node has a value. The node in the BST must be greater than or equal
to any node in its left subtree, and be smaller than any node in
its right sub-tree.
All you have to do is finish all TODO parts in BST.cpp and DO
NOT modify main.cpp as well as BST.h.
The functions are listed.a little help please
 you have to implement a Binary Search Tree (BST). Each
node has a value. The node in the BST must be greater than or equal
to any node in its left subtree, and be smaller than any node in
its right sub-tree.
All you have to do is finish all TODO parts in BST.cpp and DO
NOT modify main.cpp as well as BST.h.
The functions are listed below. Node is defined:
⮚ void InsertNode(int value): Insert a node with value to the
BST.
⮚ void DeleteNode(int value): Delete a node with value in the
BST.
⮚ int ComputeHeight(Node* node): Compute the height of the
BST.
⮚ void InOrderPrint(Node* node): Use In-Order method to print
the BST.
⮚ void LevelOrderPrint(): Use Level-Order method to print the
BST.
⮚ void Destroy(Node* node): Delete all the nodes in the BST
rooted at node.
⮚ Node* Search(int value): Search the node with value.
⮚ Node* Successor(Node* node): Find the node with minimum value
in the right sub-tree of node. 
BST.cpp
 
#include”BST.h”

#include
using namespace std;
Node* BST::Successor(Node* node) {

    //TODO: find the successor of the given node and
return it
}
Node* BST::Search(int value) {

    //TODO: search the node with value

    //if the node does’t exist, return NULL

    //otherwise return the node

}
void BST::InsertNode(int value) {

    //TODO: insert a node with value to the BST

    
}
void BST::DeleteNode(int value) {

    Node* delete_node = Search(value);

    if (delete_node == NULL) {

        cout << value << " not found.n";         return;     }     //Case 1:     if (delete_node->leftchild == NULL &&
delete_node->rightchild == NULL) {

        cout << "Delete case 1n";         //TODO: delete node with case 1     }     //Case 2:     if (delete_node->leftchild != NULL &&
delete_node->rightchild != NULL) {

        cout << "Delete case 2n";         //TODO: delete node with case 2     }     //Case 3:     cout << "Delete case 3n";     if (delete_node->leftchild != NULL) {

        //TODO: delete node with case 3
(left)
    }

    else {

        //TODO: delete node with case 3
(right)
    }

}
int BST::ComputeHeight(Node* node) {

    //TODO: compute the height of the BST

}
void BST::InOrderPrint(Node* node) {

    //TODO: print the BST in in-order method

}
void BST::LevelOrderPrint() {

    //TODO: print the BST in level-order
method
}
void BST::Destroy(Node* node) {

    //TODO: delete all node in the BST

    //TODO: print node value in post-order method before
delete it
}
BST.h
#ifndef BST_H

#define BST_H

#include

using namespace std;
struct Node {

    Node* leftchild;

    Node* rightchild;

    Node* parent;

    int value;

};
class BST

{

private:

    Node* root;
public:

    BST() :root(0) {};

    ~BST() {

        cout << "Delete all nodes (Post-Order): ";         Destroy(root);         cout << endl << endl;     };     Node* GetRoot() { return root; }     Node* Successor(Node* node);     Node* Search(int value);     void InsertNode(int value);     void DeleteNode(int value);     int ComputeHeight(Node* node);     void InOrderPrint(Node* node);     void LevelOrderPrint();     void Destroy(Node* node); }; #endif // !BST_H main.cpp #include

#include “BST.h”

#include

#include
using namespace std;
int main()

{

    int file_number = 4;

    //long long index = 1; //use this line instead of
“int index = 1” if you use VS2010, otherwise ignore it

    int index = 1;

    while (file_number–) {

        fstream file;

        string filename = “test” +
to_string(index) + “.txt”;

        cout << filename << endl;         file.open(filename, ios::in);         int cmd_num;         file >> cmd_num;

        BST tree;

        while (cmd_num–) {

            char cmd;

            int value;

            file >> cmd;

            switch (cmd)

            {

            case ‘a’:

                file
>> value;

                cout
<< "Insert value: " << value << endl;                 tree.InsertNode(value);                 break;             case 'd':                 file >> value;

                cout
<< "Delete value: " << value << endl;                 tree.DeleteNode(value);                 tree.LevelOrderPrint();                 cout << endl << endl;                 break;             case 'i':                 cout << "In-Order Traversal:" << endl;                 tree.InOrderPrint(tree.GetRoot());                 cout << endl << endl;                 break;             case 'l':                 cout << "Level-Order Traversal:" << endl;                 tree.LevelOrderPrint();                 cout << endl << endl;                 break;             case 'h':                 cout << "BST height: " << tree.ComputeHeight(tree.GetRoot()) << endl << endl;                 break;             default:                 break;             }         }         index++;         file.close();     }     system("pause");     return 0; } . Who are the experts? Experts are tested by Assignmentguruh.com as specialists in their subject area. We review their content and use your feedback to keep the quality high.When you order professional assignments here, you will get: Original custom papers. We value your academic reputation. Just as well, we value the years of thorough work on our reputation for reliability and never compromise the originality of delivered papers. We will never endanger both. Every custom assignment is written from zero – the only possible first stage of work on the order is research. We apply the latest plagiary checking tools on the final stage, so plagiarism has no chance to emerge in your college assignment writing. Control over the order completion. To make the process of collaboration comfortable and efficient, we offer our clients to choose the writer themselves taking into account all the requirements and the budget. For you to save nerves, having entrusted your fateful task to some qualified “stranger”, we enable communication with the assigned writer in the process of order completion. https://www.assignmentguruh.com/

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 929 473-0077

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code GURUH