subject

Let A be an array of n elements. Write a template function, minMaxFunc(...). which takes two parameters: 1. an unsorted array of type as an input parameter.
2. whether you want the minimum or maximum value

Use TWO stacks within the function to determine the minimum or maximum value and return that element
Stack 1 (LINKED LIST) holds values in ascending/descending order.
Stack 2 (ARRAY) is a "temporary" work stack as you insert values to keep them in order.

Once all values have been processed you must also print the values in the stack. In this question, you may use global constant SIZE-5. You must wrie all functions you call (PUSH, POP, PEEK, ISFULL ISEMPTY). You the first set then replace with the second set]: 4 1
13 3 2
1.1 4.1 8.1 5.2 2.3

Finally, with no changes to your function, instantiate your function for type char and report the outcome when using the first test data above.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, keasiabradley
Search the web for two examples of digital art that you like. the examples must be from different mediums (example: one digital photo and one computer animation not two computer animations). compose an essay for each example you choose about why the piece appeals to you, and identify the medium used.
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, MoneyMike42
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, billlyyyyyyyyyy
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
image
Computers and Technology, 24.06.2019 08:00, qveenvslayin
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
You know the right answer?
Let A be an array of n elements. Write a template function, minMaxFunc(...). which takes two paramet...

Questions in other subjects:

Konu
Mathematics, 17.06.2021 18:30
Konu
Computers and Technology, 17.06.2021 18:30
Konu
Law, 17.06.2021 18:30
Konu
Mathematics, 17.06.2021 18:30
Konu
Mathematics, 17.06.2021 18:30