DD 34
DD 34
DD 34
STRUCTURE
Vaibhav P Mujmule
DATA STRUCTURE
B.SC. II (SEM – III)
Vaibhav P Mujmule
Syllabus
Unit 1
Data Structure: introduction to data structure, types of data structure: primitive
and non primitive, linear and non linear DS, Data structure operations. Btbtr
Linear Arrays: Definition and concepts, representation, operations on arrays:
traversing, inserting, operations.btrbtr
Stacks: Definition and concepts, representations, operations on stack: Push and
Pop.brtbtr
Introduction to Data Structure
Computer is an electronic machine which is used for data processing and manipulation.btrbtr
When programmer collects such type of data for processing, he would require to store all of
them in computers main memory.
In order to make how computer work we need to know
Representation of data in computer.
Accessing of data.
How to solve problem step by step.
For doing all of this task we used Data Structure
What is Data
Structure
◦ For example, we can store a list of items having the same data-type using the array data structure.
The representation of particular data structure in the main memory of a computer is called as storage structure.
The storage structure representation in auxiliary memory is called as file structure.
It is define as the way of storing and manipulating data in organized form so that it can be used efficiently
Data Structure mainly specifies the following four things:
1)organization of data 2)accessing method 3)degree of associativity 4) processing alternative for information
Algorithm + Data Structure = Program
Data Structure study Covers the following points
1) Amount of memory require to store
2) Amount of time require to process
3) Representation of data in memory
4) Operations performs on data
Types Of DS
◦ Every item is related to its previous and next ◦ Every item is attached with many other items.
item. ◦ Data is not arranged in sequence.
◦ Data is arranged in linear sequence.
◦ Data cannot be traversed in a single run.
◦ Data items can be traversed in a single run
◦ E.g. Tree, Graph
◦ E.g. Array, Stacks, Linked list, Queue
◦ Implementation is difficult.
◦ Implementation is easy.
Operation on Data Structures
Design of efficient data structure must take operations to be performed on the DS into account. The most commonly
used operations on DS are broadly categorized into following types
1. Create: This operation results in reserving memory for program elements. This can be done by declaration
statement Creation of DS may take place either during compile-time or run-time.
2. Destroy: This operation destroy memory space allocated for specified data structure .
3. Selection: This operation deals with accessing a particular data within a data structure.
4. Updation: It updates or modifies the data in the data structure.
5. Searching: It finds the presence of desired data item in the list of data items, it may also find locations of all
elements that satisfy certain conditions.
6. Sorting: This is a process of arranging all data items in a DS in particular order, for example either ascending order
or in descending order.
7. Splitting: It is a process of partitioning single list to multiple list.
8. Merging: It is a process of combining data items of two different sorted list into single sorted list.
9. Traversing: It is a process of visiting each and every node of a list in systematic manner.
What are Arrays?
Syntax
arrayName[indexNum]
Example
balance[1]
Here, we have accessed the second value of the array using its index, which is 1.
The output of this will be 200, which is basically the second value of the balance
array.
◦ Array Representation
◦ Arrays can be declared in various ways in different languages. For illustration, let's take C array declaration.
Thank You