mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 13:31:21 +03:00
27 lines
1.8 KiB
C
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
|