The Real Time Stacks and Queues

Only available on StudyMode
  • Topic: Abstract data type, 2, 3
  • Pages : 9 (2515 words )
  • Download(s) : 47
  • Published : May 12, 2013
Open Document
Text Preview
The Real Time
Stacks and Queues

Submitted by:
Davidson Camacho
Edhel Marzo
Jennifer Robles
Jodel M. Renzal
Jorell Olivar
Mark Gil Pascua
Mary Ann Belen
Misse Valdez
Submitted to:
Mrs. Genevieve C. Polido
Department chairman

Acknowledgement

We the researchers want to give the warmest thanks to those who extended their helping hands for the accomplishment our term paper.

First and foremost, we want to thank our Almighty God for guiding us all throughout the whole process of making this kind of fulfillment.
To Mrs. Genevieve Polido for her unending support and reminders for us while doing this term paper.
To our parents for their financial and moral support.
To our friends, for their suggestions and ideas that they have been shared.
To the rest who were not mentioned, thank you very much.

To all, THANK YOU VERY MUCH!!!

RESEARCHERS

TABLE OF CONTENTS

INTRODUCTION………………………………………………………………1 DEFINITION OF TERMS…………………………………………………….3 ILLUSTRATIONS AND DISCUSSIONS……………………………………4 A. STACKS
1. CALCULATOR………………………………………………….5 2. MAGAZINE OF A GUN ……………………………………….7 3. HOPIA…………………………………………………………….9 4. SCAFFOLDING…………………………………………………11 5. PILLS……………………………………………………………..13 B. QUEUES

1. CALCULATOR……………………………………………………15 2. JUDAS BELT……………………………………………………..17 3. VEHICLES ON TOLL TAX BRIDGE………………………….17 4. STAPLES OF A STAPLER………………………………………19 5. ENROLLMENT…………………………………………………….21 CONCLUSION…………………………………………………………………….23 REFERENCES…………………………………………………………………….25

INTRODUCTION
In its most general sense, an algorithm is any set of detailed instructions which results in a predictable end-state from a known beginning. Algorithms are only as good as the instructions given, however, and the result will be incorrect if the algorithm is not properly defined. In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning. In simple words an algorithm is a step-by-step procedure for calculations. A stack is a last in, first out (LIFO) abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top. The push operation adds a new item to the top of the stack, or initializes the stack if it is empty. If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack, but if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed). 1

A queue is a particular kind of collection in which the entities in the collection are kept in order and the principal (or only) operations on the collection are the addition of entities to the rear terminal position and removal of entities from the front terminal position. This makes the queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed. This is equivalent to the requirement that once an element is added, all elements that were added before have to be removed before the new element can be invoked. A queue is an example of a linear data structure. Queues provide services in computer science, transport, and operations research where various entities such as data, objects, persons, or events are stored and held to be processed later. In these contexts, the queue performs the function of a buffer. Queues are common in computer programs, where they are implemented as data structures coupled with access routines, as an abstract data structure or in object-oriented languages as classes. Common implementations are...
tracking img