- 4 25 Points Consider The Program Below Which Preprocesses A Vector If Hi Void Triplesort Vector Int V Int Loint H 1 (235.81 KiB) Viewed 20 times
4. (25 points) Consider the program below which preprocesses a vector. if (hi void triplesort(vector& v,int loint h
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
4. (25 points) Consider the program below which preprocesses a vector. if (hi void triplesort(vector& v,int loint h
4. (25 points) Consider the program below which preprocesses a vector. if (hi void triplesort(vector<int>& v,int loint hi) { - lo) { if (v[lo] > v[hi]) swap(v[lo],v[hi]); } else { triplesort the first 2/3s of v[lo..hi]; triplesort the second 2/3s of v[lo..hi]; triplesort the first 2/3s of v[lo..hi]; return; } } a. Define a recurrence relation WITH BOUNDARY CONDITIONS as a function of the vector length which satisfies the time complexity of the program. b. Solve the recurrence relation.