Description: Expansion has been achieved through a column of basic data structures, simulate more complex data structures, is a common and practical skills. Here, we will use the stack structure to simulate a feature enhanced queue.
Specifically, you must first implement an element of type int stack, the stack can and only supports the following user interface:
bool empty () // determine whether the stack empty
void push (int) // to stack pressed into an integer
int pop () // pop the top element, and returns its value
int top () // get only the value of the stack elements, but does not pop up
Next, you must use the above stack structure, simulate the so-called Team heap (queap) structure, which supports at least the following interfaces:
void enqueue (int) // a new element into the team as the last element
int dequeue () // element of the first team squad, and returns its value (input data to ensure that the queue is not empty when you call)
int min () // Returns the
To Search:
File list (Check if you may need any files):
PA2.vcxproj
PA2.vcxproj.filters
4.cpp