Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code is supposed to be implemented in C++ Data Structures first code picture is for the first question Quick sort, Merge sort and heap

The code is supposed to be implemented in C++ Data Structures first code picture is for the first question "Quick sort, Merge sort and heap sort" and please follow the steps make sure it's working The second code picture is for the second question "Binary search tree" also please follow the steps and make sure it's working please don't change anything in the main code just add to it what is asked in the questions and thank you in advance.

Thank you.

image text in transcribedimage text in transcribedimage text in transcribed

Assignment 3 Rules: - You must submit your homework via Moodle before the due date/time. Homework submitted via email will not be accepted. - Late submissions will not be graded. - Group study is not allowed. Everyone needs to do his/her homework as an individual. If code similarity between submissions is greater than expected, you will be penalized. 1. Quick Sort. Merge Sort and Heap Sort You are given the main.cpp file containing the main function and the functions to be implemented for the sorting algorithms. You will use the main function as is. Therefore, you do not need to change the main function. It is your responsibility to add your implementations for Quick Sort, Merge Sort and Heap Sort. The necessary function signatures that you need to code are presented to you as follows: void quickSort(int arr[], int low, int high); void mergeSort(int *array, int left, int right); void heapSort (int arr[], int n ); After implementation, make sure that the sorting algorithms are working correctly. 2. Binary Search Tree You are given the main.cpp file which contains some functions for the binary search tree. You are given the main function and the function that prints the binary search tree in text format. You don't need to change them. On the other hand, the functions of insert, search, inorder traversal, preorder traversal and postorder traversal must be implemented. The signatures of the functions that need to be implemented are: void insert(Node*\& root, int info); Node* search(Node* root, int info); void inorder (Node p ) ; void preorder (Node p ) ; void postorder (Node p ); After implementation, make sure that your implementations are working correctly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Who is responsible for selecting employees?

Answered: 1 week ago

Question

The is the first thing you see when handed a report points )

Answered: 1 week ago

Question

5. Have you stressed the topics relevance to your audience?

Answered: 1 week ago