Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions