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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
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
question
Mathematics, 07.05.2020 10:58
question
English, 07.05.2020 10:58