Содержание
- 2. Queues
- 3. Introduction to Queues A queue is a waiting line – seen in daily life A line
- 4. Front Rear 1 2 3 4 Front Rear 2 3 4 Front Rear 1 2 3
- 5. The Queue As an ADT A queue is a sequence of data elements Basic operations Enqueue
- 6. Types Of Queues Linear Queue Circular Queue Double Ended Queue (Deque) Priority Queue
- 7. Double Ended Queue Double ended queues, called deques for short, are a generalized form of the
- 8. There are two variants of a double-ended queue. They include : Input restricted deque In this,
- 9. Array Implementation -Dequeue When an item is taken from the queue, it always comes from the
- 10. Array Implementation -Enqueue When an item is inserted into the queue, it always goes at the
- 11. LINKED REPRESENTATION OF QUEUEs
- 12. Dequeue
- 13. Circular Queue
- 14. 09/10/08 Drawback of Linear Queue Once the queue is full, even though few elements from the
- 15. 09/10/08 Algorithms for Insert Operations in Circular Queue For Insert Operation Insert-Circular-Q(CQueue, Rear, Front, N, Item)
- 16. 09/10/08 For Delete Operation Delete-Circular-Q(CQueue, Front, Rear, Item) CQueue is the place where data are stored.
- 17. 09/10/08 Example- ENQUEUE Circular queue with N = 5. Rear Initailly Rear = -1 and Front
- 18. 09/10/08 Example- ENQUEUE Circular queue with N = 5. Rear (Assume Index starts with 1)
- 19. 09/10/08 ENQUEUE/DEQUEUE Circular queue with N = 5.
- 20. 09/10/08 7. Insert 100. 8. Insert 40. 9. Insert 140. 10. Delete front, 11. Delete front.
- 21. 09/10/08 Example- ENQUEUE / DEQUEUE Circular queue with N = 5. Rear (Index starts with 0)
- 22. Double Ended Queue Double ended queues, called deques for short, are a generalized form of the
- 23. There are two variants of a double-ended queue. They include : Input restricted deque In this,
- 25. Скачать презентацию