Guest_imported
New member
- Jan 1, 1970
- 0
I have a project where I must use quick sort,bubble sort, and merge sort. I have the following code:
void bubbleSort(int a[], int n);
void Merge( vector <int>& list, int low, int mid, int low1, int high);
void MergeSort(vector<int>& list, int low, int high);
void Quicksort(vector <int> & list, int lower, int upper);
void Partition ( vector <int> &list, int lo, int hi, int & pivot);
I have the numbers in an Array called "Array". The bubblesort works : bubbleSort(Array,limit);
Any suggestions on what I need to do to get the array to work as a vector for the other sorts? I tried setting a vactor : vector new = Array;
That didnt work. Any suggestions would be greatly appreciated.
Thanks,
WZiggy
<jgardne@stedwards.edu>
void bubbleSort(int a[], int n);
void Merge( vector <int>& list, int low, int mid, int low1, int high);
void MergeSort(vector<int>& list, int low, int high);
void Quicksort(vector <int> & list, int lower, int upper);
void Partition ( vector <int> &list, int lo, int hi, int & pivot);
I have the numbers in an Array called "Array". The bubblesort works : bubbleSort(Array,limit);
Any suggestions on what I need to do to get the array to work as a vector for the other sorts? I tried setting a vactor : vector new = Array;
That didnt work. Any suggestions would be greatly appreciated.
Thanks,
WZiggy
<jgardne@stedwards.edu>