TheAlgorithms-C/data_structures/graphs/queue.h

27 lines
1.8 KiB
C

// Queue ADT header file ... COMP2521
typedef struct QueueRep *queue;
queue newQueue(); // set up empty queue
void dropQueue(queue); // remove unwanted queue
int QueueIsEmpty(queue); // check whether queue is empty
void QueueEnqueue(queue, int); // insert an int at end of queue
int QueueDequeue(queue); // remove int from front of queue
// By
// .----------------. .----------------. .----------------. .-----------------. .----------------. .----------------.
// | .--------------. || .--------------. || .--------------. || .--------------. | | .--------------. || .--------------. |
// | | _________ | || | _____ _____ | || | __ | || | ____ _____ | | | | ____ ____ | || | ____ | |
// | | | _ _ | | || ||_ _||_ _|| || | / \ | || ||_ \|_ _| | | | | |_ || _| | || | .' `. | |
// | | |_/ | | \_| | || | | | | | | || | / /\ \ | || | | \ | | | | | | | |__| | | || | / .--. \ | |
// | | | | | || | | ' ' | | || | / ____ \ | || | | |\ \| | | | | | | __ | | || | | | | | | |
// | | _| |_ | || | \ `--' / | || | _/ / \ \_ | || | _| |_\ |_ | | | | _| | | |_ | || | \ `--' / | |
// | | |_____| | || | `.__.' | || ||____| |____|| || ||_____|\____| | | | | |____||____| | || | `.____.' | |
// | | | || | | || | | || | | | | | | || | | |
// | '--------------' || '--------------' || '--------------' || '--------------' | | '--------------' || '--------------' |
// '----------------' '----------------' '----------------' '----------------' '----------------' '----------------'
// Email : z5261243@unsw.edu.au
// hhoanhtuann@gmail.com