What is Data Structure? Define Its Type and Major operations in Data Structure. Searching, Sorting, Primitive and Non - Primitive Data Structure?
DATA STRUCTURE & ALGORITHM
Data Structure :-
o Data Structure is a way
to store and Organize data so that it can be used efficiently.
o It is a set of Algorithms
that we can use in any programming language to structure the data in the Memory.
Ø Type of Data Structure
:-
There are two types of
Data Structure-
1). Primitive Data
Structure
2). Non – Primitive
Data Structure
The Primitive Data
structure are Primitive Data Types. The int, char, float, double and Pointer
are primitive data structure that can hold a single value.
ü Non – Primitive Data
Structure :-
The Non – Primitive Data
Structure is divided into two parts-
a). Linear Data
Structure
b). Non – Linear Data
structure
Linear Data Structure
The Arrangement of data
in a sequential manner is known as a Linear Data Structure.
The Data Structure used
for this purpose are Array, Linked List, Stack and Queues.
In this Array Data
structure, One element is form connected to any to only another element in a
linear form.
Non – Linear Data
Structure
When one element is
connected to the ‘n’ number of element known as a Non – Linear Data Structure.
The Best Example is
Tree and Graph. In this case elements are arranged in a random manner.
Ø Major Operations In
Data Structure –
The major operations
that can be performed on the data Structure are –
1. Searching – We can search for any
elements in a data structure.
2. Sorting – We can sort the
elements of a data structure either in a ascending order or descending order.
3. Insertion – we can also insert
the new element in Data structure.
4. Updation – We can also update the element, i.e we can
replace the element with another element.
5. Deletion – We can also perform
the delete operation to remove the element from the data Structure.
Comments
Post a Comment