min(v), where v is a vector of integers. Function min returns the smallest element of the vector.rotateRight(v), where v is a vector of integers. Function rotateRight moves each element in the vector one space to the right and moves the last element of the vector to the beginning of the vector.largestLast(v), where v is a vector of integers. Function largestLast swaps the positions of the largest element in the vector and the last element in the vector.Write the sort function that satisfies the following Hoare triple. Publish your code on RPubs. Include a paragraph that describes the efficiency of your function.
\( \{v = V \wedge v.size = N\} \)
\( v :=\,? \)
\( \{\mathrm{perm}(v,V) \wedge (\forall i | 0 \le i \lt N \wedge v[i] \,\mathrm{mod}\, 2 = 1 : (\forall j | 0 \le j \lt N \wedge v[j] \,\mathrm{mod}\, 2 = 0:i \lt j))\} \)
Publish the following RECURSIVE functions, one per slide, on RPubs. Publish only the functions. Do not publish main().
double max(double v[], int numItems) that returns the largest value in array v.int pow2(int k) that returns the kth power of 2, assuming k is nonnegative. For example
pow(0) == 1pow(1) == 2pow(2) == 4pow(3) == 8int count(int v[], int x, int numItems) that returns the number of times x occurs in v.Publish the following RECURSIVE functions, one per slide, on RPubs. Publish only the functions. Do not publish main().
bool neighbor13(int v[], int numItems) that returns true if two adjacent elements in v add to 13, and false otherwise.void rotateRight(int v[], int numItems).