SARA K.

asked • 10/26/19

How to design a function that will let only the minimum elements be at the bottom? C++


Write the body of the user function below that changes a stack so that all occurrences of the smallest item are at the bottom of the stack, while the order of the other items remains the same. For example, the stack [4,3,2,5,8,2,4] (where the top item is the first) will be changed into [4,3,5,8,4,2,2] void minBottom ( StackType & stack).

1 Expert Answer

By:

Patrick B. answered • 10/27/19

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.