Unformatted text preview: to sort. Then, the program should create an array of integes that size, populate it with random numbers, and print out the array. The program then calls a function sort(int a[ ], int size) to sort the array, this function should take an array of integers and the size of an array as parameters. Once the array is sorted, the main program should print the sorted array. The function sort(int a[ ], int size) should create the ﬁrst Quicksort thread. Think carefully about the following issues, and then make the best decision in your program: (1) Does the sort function have to join the ﬁrst Quicksort thread that is cre-ated? (2) Does each Quicksort thread have to join neither, one, or both of the Quick-sort threads that it creates? 1...
View Full Document
- Spring '09
- Sort, Array, Divide and conquer algorithm, quicksort algorithm, PROFESSOR GODFREY MUGANDA