Presentation is loading. Please wait.

Presentation is loading. Please wait.

Foundation of Computing Systems Lecture 3 Stacks and Queues.

Similar presentations


Presentation on theme: "Foundation of Computing Systems Lecture 3 Stacks and Queues."— Presentation transcript:

1 Foundation of Computing Systems Lecture 3 Stacks and Queues

2 30.07.09IT 60101: Lecture #32 Stacks: Example

3 30.07.09IT 60101: Lecture #33 Stacks: Definition A stack is an ordered collection of homogeneous data element where the insertion and deletion operations take place at one end only LIFO (Last In First Out)

4 30.07.09IT 60101: Lecture #34 Stacks: Memory Representations Array representation Linked list representation

5 30.07.09IT 60101: Lecture #35 Stacks: Operations PUSH To insert an item into the stack POP To remove an item from a stack STATUS To know the present state of a stack TOPTo read the top element

6 30.07.09IT 60101: Lecture #36 Stacks: Applications Stack is extensively used in system programming –Arithmetic expression evaluation –Code Generation –Implementation of recursion –Activation record management For details on stack application see the book Classic Data Structures Chapter 4 PHI, 2nd Edn., 17th Reprint

7 30.07.09IT 60101: Lecture #37 Queues: Example

8 30.07.09IT 60101: Lecture #38 Queue: Definition Queue is an ordered collection of homogeneous data elements where, insertion and deletion operations take place at two extreme ends FIFO (First In First Out)

9 30.07.09IT 60101: Lecture #39 Queue: Memory Representations Array representation Linked list representation

10 30.07.09IT 60101: Lecture #310 Queue: Operations Enqueue To insert an item into a queue Dequeue To remove an item from a queue Status To know the present state of a queue

11 30.07.09IT 60101: Lecture #311 Circular Queue

12 30.07.09IT 60101: Lecture #312 DEQueue

13 30.07.09IT 60101: Lecture #313 Priority Queue

14 30.07.09IT 60101: Lecture #314 Priority Queue using Array

15 30.07.09IT 60101: Lecture #315 Priority Queue using Array

16 30.07.09IT 60101: Lecture #316 Priority Queue using Linked List

17 30.07.09IT 60101: Lecture #317 Priority Queue using Heap Tree

18 30.07.09IT 60101: Lecture #318 Queue: Applications Stack is extensively used in Operating System –Simulation –CPU Scheduling in Multiprogramming Environment –Process Scheduling For details on Queue application see the book Classic Data Structures Chapter 5 PHI, 2nd Edn., 17th Reprint


Download ppt "Foundation of Computing Systems Lecture 3 Stacks and Queues."

Similar presentations


Ads by Google