Data Structure as the name tells structure
of keeping data in memory, in simple words Data Structure is a way to storing and
organize data into memory, there are many different algorithms available that
has their own benefits so as per the demand or requirement we choose any way to
store data.
Some of Data Structures examples are Array, Linked
List, Stack, Queue, tree etc.
Now days data structures are widely used in most in
computer science example: Graphics design, Operating system design, compiler
designing etc.
The different algorithms provide the efficient
way to storing data, searching data that increase the performance.
Here I will try to explain data structure concept
in very simple way with the help of pseudo codes that any computer science student
or programmer can understand core concepts, for practical examples I will use
Java language, I am sure after learning core concept you can write your own
example in any programming language.
Advantage of Using Data Structure
In real life applications complexity increasing
day by day so that storing high amount of data in memory and searching it on
demand becoming nightmare.
1.
There could
be billion files per entity and processor may fail to deal with high amount of
data so that the Data Structure-algorithm increases the processing speed.
2.
An
application can be used by multiple users and searching specific record in
short time is not that easy for application so that Structure-algorithm is very
much efficient to make the
searching fast example: binary search, tree, hashtable etc.
3.
Data Structure is reusable that means once we implement the DS algorithm for our application
compile into library file that we can use it with other client as well.
Types of Data Structure
Data
Structure means how we will store and organize data in memory for that we can
define DS in two types.
1. Primitive
With any programming
language we have some pre-defined data types or you can say data structures
that will store our data values in memory.
Examples:
Integer to store numeric values like int a=2,
Char to store
char values like char a=’e’,
Float to
store decimals value like float a=3.14,
Pointers that
store the address of any other memory location.
2. Non-Primitive
Non-primitive
data structure is simply an object, objects are created but not predefined, with
programming languages there are many primitive data structure that use to store
and organize objects in memory like array,enum etc.
Non-Primitive
Data Structures again divided into two different parts,
1. Linear
Linear Data
Structures organize data in sequential order example: Array, LinkedList, Stack,
Queue.
2. Non-Linear
Non-Linear
Data Structure does not organize data in sequential order example: Tree,
Graphs.
We will
discuss Linear and Non-Linear Data Structures with examples in detail, please
see the diagram given below to understand different types of Data Structure.
We will learn each topic one by one, you can go through with the link related to each topic given below. Before that let’s discuss about the Data Structure operations.
Operations Of Data Structure
Data Structure
algorithm performs some operations on data stored in memory.
Insertion – Inserting
data into data structure at last, end,
any position.
any position.
Deletion – Deleting
data from last, end, any position from
data structure.
data structure.
Traverse – Traversing
means reading data from
data structure, searching, sorting operations
perform.
data structure, searching, sorting operations
perform.
Merging – Merging two
data structures of same type of
data, for example if we have one list A and
another list B of same type of data then
after merging we will have new list C.
data, for example if we have one list A and
another list B of same type of data then
after merging we will have new list C.
Explore Data Structure By Topic Wise
Please click on the corresponding link and know more about each topic.
No comments:
Post a Comment