Data Structure is a graphical representation of the data.
Data structure is representation of the logical relationship
existing between individual element of data. In other words, a data structure
is a way of organizing all data items that consider not only the elements
stored but also their relationship to each other. The mainly use of data
structure is organization data , data management and data storage format . It's
mean how to data store and how to data manage .
Data structure are the building blocks of program. Hence the
selection of a particular data structure stresses on the following two things :
1. Data structures must be rich enough in structure to reflect the
relationship existing between the data.
2. The
structure should be simple so that we can process data effectively whenever
required.
Data structure are divided into two types :
· * Primitive Data structure
· *Non-Primitive Data structure
Primitive Data structure :- These are basic structures and are
directly operated upon by machine instructions. These in general have different
representations on different computers. Integers,floating,point
numbers,character constants,string constants,pointers etc.
Non-Primitive Data structure :- These are more sophisticated data
structures. These are derived from the primitive data structure. The
non-primitive data structures emphasize on structuring of a group of
homogeneous ( same type ) or heterogeneous ( different type ) items. For
example : arrays,lists and files.
Non-Primitive Data structure are divided into following
categories
· Linear data structure
· Non-linear data structure
Linear data structure : A data structure whose
elements from a sequence and every element in the structure has a unique
predecessor and unique successor. It's mean which type of Data stored in linear
way is called linear data structure.
Examples of linear data structure are arrays, linked lists
,stacks and queues.
The linear data structure is as follows,
Array: An
array is a list of finite number of elements of same data type like integers or
strings etc.
Linked list : A linked list is a linear collection of data elements
called nodes. Each node is divided into two or more parts. A linked list can be
linear linked list or doubly linked list. The linear order is maintained by
pointers.
Stack : A
stack also called it last in first out ( LIFO ) system ,is a linear list in
which insertions and deletions can take place only at one end , It's called the
Top.
Queue : A
queue also called as First-In-First-Out ( FIFO ) system. Insertions can take
place at one end of the queue, called the " Rear " and deletions can
take place only at other end , called the " Front " of the queue.
Non-linear data structure : A data structure whose elements do not
from a sequence. It's mean which type of data stored in non-linear way is
called non-linear data structure.
Example of non-linear data structure are trees and graphs.
The non-linear data structure is as follows,
Tree : A tree is data
structure that represents a hierarchical relationship between various elements.
A binary tree is a tree that can have at most two children. Parent node has a
at lest two child node. Basically tree is a two type binary tree and BST (
Binary Search Tree ). It's construct by child node ,parent node, leafs, keys
etc.
Graphs : A
graph G is a ordered set ( V,E ) , where V represents set of elements called
"Vertices" in graph and E represents the "Edges" between
these element. A graph is a pictorial representation of a set of objects where
some pairs of objects are connected by links. It's construct by the vertices,
edges, adjacency, paths.
Data structure & types
Reviewed by Shubham Rathor
on
February 10, 2019
Rating:
No comments: