Question: . For all programming tasks, it is not allowed to use any external libraries (import) if not stated otherwise. kindly make a single program of

. For all programming tasks, it is not allowed to use any external libraries ("import") if not stated otherwise.

kindly make a single program of all these question...don't use the built in function.

Implement in C++ the program ArrayUtility, which offers basic operations over one-dimensional arrays. All methods must be implemented as functions. The signature of the functions in the ArrayUtility program are the following:

Q. # 01:-int findMax(int[] A, int i, int j):

returns the maximum value occurring in the array A between position i and j.

Q. # 02:- int findMaxPos(int[] A, int i, int j):

returns the position of the maximum value in the array A between position i

and j.

Q. # 03:- int findMin(int[] A, int i, int j):

returns the minimum value in the array A between position i and j.

Q. # 04:- int findMinPos(int[] A, int i, int j):

return the position of the minimum value in the array A between position i

and j.

Q. # 05:- void swap(int[] A, int i, int j):

Swaps the elements in position i and j in the array A.

Q. # 06:- 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).

Q. # 07:- void shiftLeft(int[] A, int i, int j):

shifts to the left all the elements of the array A, from position j down to position i (i.e., moves the element in position k to position k 1 for all i < k j, and leaves the position j unchanged).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!