/* Queue. H -- queue header file */<br/> # include "head. H "</P> <p>/* interface function declaration */</P> <p>/* operation: before creating and initializing a queue */<br/>/*: After PQ points to a queue */<br/>/*: if the memory allocation is successful, create and initialize the queue, and return true; otherwise, return false */<br/>/* time complexity: O (1) */<br/> bool initialize_q (queue * const PQ); </P> <p>/* operation: before determining whether a queue is empty */<br/>/* operation: PQ points to an initialized queue */<br/>/* operation: if this queue is empty, true is returned; otherwise false */<br/>/* time complexity: O (1) */<br/> bool isempty_q (const queue * const PQ); </P> <p>/* operation: add a data field to the queue as the specified data node */<br/>/* before the operation: PQ points to an initialized queue, item indicates the data to be added */<br/>/* operation: if the memory is allocated successfully, the node with the data field "item" is added to the queue, and true is returned; otherwise false */<br/>/* time complexity: O (1) */<br/> bool enqueue_q (const queue * const PQ, const item ); </P> <p>/* operation: deletes the header node from the queue and releases the occupied memory space, and assign the data field to the specified variable */<br/>/* before the operation: PQ points to an initialized queue, and messenger is a pointer to item, the function used to carry data back to call this function */<br/>/*: If the queue is not empty, delete the header node and release the memory space it occupies, update the header node and assign it to * messenger */<br/>/* time complexity: O (1) */<br/> bool dequeue_q (const queue * const PQ, item * const Messenger); </P> <p>/* operation: release the memory space occupied by a queue */<br/>/* before the operation: PQ points to an initialized queue */<br/>/* after the operation: the memory space occupied by this queue is released */<br/>/* time complexity: O (n) */<br/> void release_q (const queue * const PQ );