This is a C++ project that I need help setting up in Visual Studio Code. I do not need you to code for me; I just need help setting the project up with basic syntax and class names/structures.
CS 201 Data Structures Library Phase 2
Due 3/24
Phase 2 of the CS201 programming project will be built around a balanced search tree. In particular, you should implement top-down 2-3-4 trees as discussed in class. Your tree should be built as part of the two4Tree class. You should re-use your circular dynamic array class inside the nodes of the tree to store the value types, but you can use a scaled-down version of your class that only supports the needed operations.
The public methods of your class should include the following (keytype and valuetype indicate the types from the template):
Function Description Runtime
two4Tree(); Default Constructor. The tree should be O(1) empty
two4Tree(keytype k[], valuetype v); For this constructor, the tree should be built O(s log s) where s is the number of items in the arrays K and V containing keytype and valuetype. The tree should be built using repeated insertion.
two4Tree(); Destructor for the class. O(n)
valuetype * search(keytype k); Traditional search. Should return a pointer to the first valuetype stored with the key. If the key is not stored in the tree, the function should return NULL.
void insert(keytype k, valuetype v); Inserts the node with key k and value v into the tree. If the item already exists in the tree, then increment a counter associated with the key to indicate an additional item of that key in the tree (don't create a new node) and add the new value v to the end of a circular dynamic array of values associated with that key.
int remove(keytype k); Removes the node with key k and returns 1. If more than one instance of that key is in the tree, then decrement the counter for that key and remove the first (front) value in the array of values. If key k is not found, then remove should return 0. If the node with key k is not part of a leaf, then replace k by its predecessor.
int rank(keytype k); Returns the rank of the key k in the tree. Returns 0 if the key k is not found. The smallest item in the tree is rank 1. If there are multiple instances of the key k in the tree, return the rank of the first instance.
keytype select(int pos); Order Statistics. Returns the key of the node at position pos in the tree. Calling with pos = 1 should return the smallest key in the tree, pos = n should return the largest. Much like search, but returns the count of key k in the tree. 0 means not in the tree. Returns the number of keys in the tree.
Prints the nodes of the tree in a preorder traversal. Print all keys in a node separated by spaces, terminated by a newline. Then continue to the next node in the traversal.
Prints the keys of the tree in an inorder traversal. The list of keys is separated by a single space and terminated with a newline. The keys should appear in sorted order.
Prints the keys of the tree in a postorder traversal. Print all keys in a node separated by spaces, terminated by a newline. Then continue to the next node in the traversal.
int duplicates(keytype k);
int size();
void preorder();
void inorder();
void postorder();
Your class should include proper memory management, including a destructor, a copy constructor, and a copy assignment operator.