Question: Write a function in C++ that implements insertion sort on an STL queue using only this queue and an additional STL stack. The function must
Write a function in C++ that implements insertion sort on an STL queue using only this queue and an additional STL stack. The function must work for queues of integers, doubles, chars, and strings. Return the sorted queue in a vector.
1. Write the function to sort a queue.
2. Test your function in main() on the four listed queue types above. Print the vector that is returned.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
