Question: //Threaded quick sort in C++ //You need to create 4 new thread to perform quick_sort #include #include using namespace std; //The following funciton will be
//Threaded quick sort in C++ //You need to create 4 new thread to perform quick_sort #include#include using namespace std; //The following funciton will be the work for each thread void quick_sort(vector &V, int i, int j); //sort elements of vector V from position i to position j int main() { int n = 100000; vector V(n);//V has n elements. for (int i = 0; i < 100000; i++) V[i] = rand() % 5000; //You need to crate four threads to help perform sorting //You need to then save the sorted result to output.txt }
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
