Ijtrd6618 PDF
Ijtrd6618 PDF
Ijtrd6618 PDF
www.ijtrd.com
Abstract-- The logical or mathematical model for a particular performed on it, and the mathematical properties of those
organisation of data is called data structure. Now we are going operations.
to do an comparative study on the basis of data structure.
III. STACK
Key Words-- Data, stack, insert, complexity.
A stack is an abstract data type that serves as a collection of
I. INTRODUCTION elements, with two principal operations: push, which adds an
element to the collection, and pop, which removes the most
A data structure is a particular way of organizing data in a
recently added element that was not yet removed. The order in
computer so that it can be used efficiently. Data structures can
which elements come off a stack gives rise to its alternative
implement one or more particular abstract data types (ADT),
name, LIFO (for last in, first out). Additionally,
which specify the operations that can be performed on a data
a peek operation may give access to the top without modifying
structure and the computational complexity of those operations.
the stack.
In comparison, a data structure is a concrete implementation of
the specification provided by an ADT. The name "stack" for this type of structure comes from the
analogy to a set of physical items stacked on top of each other,
Data: Data are set of values.
which makes it easy to take an item of the top of the stack,
Data item: Data item refers to a single unit of values. while getting to an item deeper in the stack may require taking
off multiple other items first.
Data types: A data type is a term which refers to a kind of data
that may appear in computation. Considered as a linear data structure, or more abstractly a
sequential collection, the push and pop operations occur only at
II. DATA STRUCTURES one end of the structure, referred to as the top of the stack. This
A data structure is a way to logically organise data that makes it possible to implement a stack as a singly linked
specifies a set of elements is that a data object and a set of list and a pointer to the top element.
operations which may legally be applied to elements of this A stack may be implemented to have a bounded capacity. If the
data object. stack is full and does not contain enough space to accept an
A data structure is a particular way of organizing data in a entity to be pushed, the stack is then considered to be in
computer so that it can be used efficiently. Data structures can an overflow state. The pop operation removes an item from the
implement one or more particular abstract data types which are top of the stack.
the means of specifying the contract of operations and
their complexity. Different kinds of data structures are suited to
different kinds of applications, and some are highly specialized
to specific tasks.
Data structures provide a means to manage large amounts of
data efficiently for uses such as large databases and internet
indexing services. Usually, efficient data structures are key to
designing efficient algorithms. Some formal design methods
and programming languages emphasize data structures, rather
than algorithms, as the key organizing factor in software
design. Storing and retrieving can be carried out on data stored
in both main memory and in secondary memory.
Data structures are generally based on the ability of a computer
to fetch and store data at any place in its memory, specified by
a pointer-a bit string, representing a memory address that can IV. QUEUE
be itself stored in memory and manipulated by the program.
Thus, the array and record data structures are based on A queue is a particular kind of abstract data type or collection
computing the addresses of data items with arithmetic in which the entities in the collection are kept in order and the
operations; while the linked data structures are based on storing principal operations on the collection are the addition of entities
addresses of data items within the structure itself. Many data to the rear terminal position, known as enqueue, and removal of
structures use both principles, sometimes combined in non- entities from the front terminal position, known as dequeue.
trivial ways. This makes the queue a First-In-First-Out (FIFO) data structure.
In a FIFO data structure, the first element added to the queue
The implementation of a data structure usually requires writing will be the first one to be removed. This is equivalent to the
a set of procedures that create and manipulate instances of that requirement that once a new element is added, all elements that
structure. The efficiency of a data structure cannot be analyzed were added before have to be removed before the new element
separately from those operations. This observation motivates can be removed. Often a peek or front operation is also entered,
the theoretical concept of an abstract data type, a data structure returning the value of the front element without dequeuing it. A
that is defined indirectly by the operations that may be
IJTRD | Jan-Feb 2017
Available Online@www.ijtrd.com 491
International Journal of Trend in Research and Development, Volume 4(1), ISSN: 2394-9333
www.ijtrd.com
queue is an example of a linear data structure, or more value, together with a list of references to nodes , with the
abstractly a sequential collection. constraints that no reference is duplicated, and none points to
the root.
Queues provide services in computer science, transport,
and operations research where various entities such as data, Alternatively, a tree can be defined abstractly as a whole as
objects, persons, or events are stored and held to be processed an ordered tree, with a value assigned to each node. Both these
later. In these contexts, the queue performs the function of perspectives are useful: while a tree can be analyzed
a buffer. mathematically as a whole, when actually represented as a data
structure it is usually represented and worked with separately
Queues are common in computer programs, where they are
by node. For example, looking at a tree as a whole, one can talk
implemented as data structures coupled with access routines, as
about "the parent node" of a given node, but in general as a data
an abstract data structure or in object-oriented languages as
structure a given node only contains the list of its children, but
classes. Common implementations are circular
does not contain a reference to its parent.
buffers and linked lists.
V. LINKED LIST
In computer science, a linked list is a linear collection of data
elements, called nodes pointing to the next node by means of VII. GRAPH
pointer. It is a data structure consisting of a group In computer science, a graph is an abstract data type that is
of nodes which together represent a sequence. Under the meant to implement the undirected graph and directed graph
simplest form, each node is composed of data and concepts from mathematics.
a reference (in other words, a link) to the next node in the
sequence; more complex variants add additional links. This A graph data structure consists of a finite set of vertices
structure allows for efficient insertion or removal of elements or nodes or points. together with a set of unordered pairs of
from any position in the sequence. these vertices for an undirected graph or a set of ordered pairs
for a directed graph. These pairs are known as edges, arcs,
Linked lists are among the simplest and most common data or lines for an undirected graph and as arrows, directed
structures. They can be used to implement several other edges, directed arcs, or directed lines for a directed graph. The
common abstract data types, including lists (the abstract data vertices may be part of the graph structure, or may be external
type), stacks, queues,associative arrays, and S-expressions, entities represented by integer indices or references.
though it is not uncommon to implement the other data
structures directly without using a list as the basis of A graph data structure may also associate to each edge
implementation. some edge value such as a symbolic label or a numeric
attribute.
The principal benefit of a linked list over a
conventional array is that the list elements can easily be
inserted or removed without reallocation or reorganization of
the entire structure because the data items need not be stored
contiguously in memory or on disk, while an array has to be
declared in the source code, before compiling and running the
program. Linked lists allow insertion and removal of nodes
at any point in the list, and can do so with a constant number of
operations if the link previous to the link being added or
removed is maintained during list traversal.
On the other hand, simple linked lists by themselves do not
allow random access to the data, or any form of efficient
indexing. Thus, many basic operations - such as obtaining the VIII. COMPARISON
last node of the list (assuming that the last node is not
As based on the above survey and based on us we find that
maintained as separate node reference in the list structure), or
queue is the best method in linear data structure because it is
finding a node that contains a given datum, or locating the
easy to insert elements and delete items easily if we want to
place where a new node should be inserted - may require
insert an item it is also easy to delete an item. So, we prefer that
sequential scanning of most or all of the list elements.
queue is the best way used in this survey.
VI. TREE
Reference
In computer science, a tree is a widely used abstract data type-
[1] https://en.wikipedia.org/wiki/Data_structure
or data structure implementing this ADT-that simulates a
[2] https://www.google.co.in/#q=DATA+STRUCTURE+
hierarchical tree structure, with a root value and sub-trees of
AND+ITS+Types
children with a parent node, represented as a set of linked nodes
[3] https://www.google.co.in/#q=definition+of+data+struc
A tree data structure can be defined recursively as a collection ture
of nodes, where each node is a data structure consisting of a