Sie sind auf Seite 1von 6

1

Data Structure
Walter Cha

2

AudienceandScope

The audience for this description is a general people who dont know about computer knowledge.
This paper will discuss what data structure exist and where and why they are used.

Introduction

A data structure is a particular way of organizing data in a computer so that it can be used efficiently.
Different kinds of data structures are suited to different kinds of applications, and some are highly
specialized to specific tasks [1]. For example, Queues are used in an Operating System when it
managed a lot of program execution order. This description will introduce three data structures;
Stack, Queue, Tree.

Stack

What is Stack?
In computer science, a stack is a particular kind of abstract data type or collection. It has two
operations: push and pop. Push is the operation which adds an entity to the collection. Pop is the
operation which removes an entity. The relationship between the push and pop operations is that
the stack is a Last-In-First-Out (LIFO) data structure. In a LIFO data structure, the last element added
to the structure must be the first one to be removed. The push and pop operations occur only at
one end of the structure, referred to as the top of the stack [2-3].

Figure 1 : How to work in stack operations

Where and why it used?
In hardware, a stack is used in a memory structure. It is usually represented in computers by a block
3

of memory cells, with the "bottom" at a fixed location, and the stack pointer holding the address
of the current "top" cell in the stack. The words top and bottom are used irrespective of whether
the stack actually grows towards lower memory addresses or towards higher memory addresses.
In software, it is used in numerous ways in everyday life. For example, it is used in an expression
evaluation and syntax parsing, which means the stack reads sentences or codes and deciphers them.
It is very useful to convert a decimal number into a binary number [2].


Figure 2: Converting a decimal number into a binary number

Queue

What is Queue?
In computer science, a queue is a particular kind of abstract data type or collection. It has two
operations on the collection: enqueue and dequeue. Enqueue is the operation which adds an entity
to the rear terminal position. Dequeue is the operation which removes 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 [4].
Figure 3: How to work in queue operations
4


Where and why it used?
Queues provide services in computer science where various entities such as data, objects or
functions are stored and held to be processed later. The queue performs the function of a buffer.
Modern computers are capable of running many different programs or processes at the same time.
However, the CPU is only capable of handling one process at a time. Processes that are ready for
the CPU are kept in a queue for "ready" processes. The queue is called ready queue. Other
processes that are waiting for an event to occur, such as loading information from a hard drive or
waiting on an internet connection, are not in the ready queue [4].


Tree

What is Tree?
A tree is a widely used abstract data type (ADT) or data structure implementing this ADT that
simulates a hierarchical tree structure, with a root value and subtrees of children, represented as a
set of linked nodes.
A tree data structure can be defined recursively (locally) as a collection of nodes (starting at a root
node), where each node is a data structure consisting of a value, together with a list of references
to nodes (the "children"), with the constraints that no reference is duplicated, and none points to
the root [5].

Figure 4: Sample tree structure


5

Where and why it used?
Trees have many structures. However, their role is same: sorting the elements of data. It is used in
making a directory of files and data. Also it makes a recent history of files you execute. Time for
searching a number of data is very short comparing not to using tree.






























6

Reference

[1] Data structure (2014). Wikipedia. Available: http://en.wikipedia.org/wiki/Data_structure
[2] Stack (2014). Wikipedia. Available: http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
[3] What is stack? (2014). Webopedia. Available: http://www.webopedia.com/TERM/S/stack.html
[4] Queue (2014). Wikipedia. Available: http://en.wikipedia.org/wiki/Queue_(abstract_data_type)
[5] Tree (2014). Wikipedia. Available: http://en.wikipedia.org/wiki/Tree_(data_structure)


Figures
Figure 1: http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
Figure 2: http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
Figure 3: http://en.wikipedia.org/wiki/Queue_(abstract_data_type)
Figure 4: http://en.wikipedia.org/wiki/Tree_(data_structure)

Das könnte Ihnen auch gefallen