Dequeue
-
자료구조: Linked List Queue 구현하기 (feat. c++)알고리즘/자료구조 2021. 5. 31. 19:35
Characteristic: - MyQueue class is a Queue class consisted of linked list Operations: - enqueue - dequeue - front - isEmpty #include #include using namespace std; template class MyQueue { public: MyQueue(); void enqueue(queueElementType elem); queueElementType dequeue(); queueElementType front(); bool isEmpty(); private: struct Node; typedef Node* nodePtr; struct Node { queueElementType elem; no..
-
자료구조: Circular Queue 구현하기 (feat. c++)알고리즘/자료구조 2021. 5. 31. 18:57
Characteristic: - queue class is an array Circular Queue class Operations: - enqueue - dequeue - front - isEmpty #include #include using namespace std; const int maxQueue = 10; int nextPos(int p); template class queue { public: queue(); void enqueue(QueueElementType e); QueueElementType dequeue(); QueueElementType front(); bool isEmpty(); private: int f; int r; QueueElementType queueArray[maxQue..