Introdunction of Data Structure
Introdunction of Data Structure
Structure
Introduction to Data Structure
Computer is an electronic machine which is used for data processing and manipulation.
When programmer collects such type of data for processing, he would require to store all of
them in computer’s main memory.
In order to make computer work we need to know
o Representation of data in computer.
o Accessing of data.
o How to solve problem step by step.
For doing this task we use data structure.
DATA
STRUCTURE
PRIMITIVE NON
PRIMITIVE
Data types
A particular kind of data item, as defined by the values it can take, the programming language
used, or the operations that can be performed on it.
1. Create
The create operation results in reserving memory for program elements. This can be done by
declaration statement. Creation of data structure may take place either during compile-time or run-
time. malloc() function of C language is used for creation.
2. Destroy
Destroy operation destroys memory space allocated for specified data structure. free() function of C
language is used to destroy data structure.
3. Selection
Selection operation deals with accessing a particular data within a data structure.
5. Searching
It finds the presence of desired data item in the list of data items, it may also find
the locations of all elements that satisfy certain conditions.
6. Sorting
Sorting is a process of arranging all data items in a data structure in a particular
order, say for example, either in ascending order or in descending order.
7. Merging
Merging is a process of combining the data items of two different sorted list into a single
sorted list.
8. Splitting
Splitting is a process of partitioning single list to multiple list.
9. Traversal
Traversal is a process of visiting each and every node of a list in systematic manner.