Question: Write a program in C++: 1) int findMax(int A[], int i , int j) returns the maximum value occurring in the array A between position
Write a program in C++:
1) int findMax(int A[], int i , int j) returns the maximum value occurring in the array A between position i and j 2) int findMaxPos(int A[], inti , int j) returns the position of the maximum value in the array A between position i and j. 3) void swap(int A[], int i , int j) swaps the elements in position i and j in the array A. 4) void shiftRight(int A[], int i , int j): shifts to the right all the elements of the array A starting from position i and until position j (i.e., moves the element in position k to position k+1 for all i k < j, and leaves position i unchanged)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
