You are on page 1of 8

Data Structures

Lecture Number : 05
…Sandhya Thakkar
Operations on Data Structures

The Data stored in various Data Structures can be processed using various Operations

The choice of particular data structure for a given application mainly depends upon the

frequency with which such operations are performed.

Some most frequently used operations known as Primitive Operations are

Low Level Operations independent of Programming Languages

For Example : assignment , control (branching and subroutine calls) ,

arithmetic and logical (addition and comparison etc.)


Operations on Data Structures

Some other operations which can be applied using Primitive Operations are :

Insertion : Adding a new element into the data structure is known as Insertion

Deletion : Removing an element from the data structure is known as Deletion

Traversing : Accessing each element exactly once in order to process it is known as Traversing

Searching : Finding the position of the desired element in the data structure is known as Searching
Operations on Data Structures

Besides these basic operations there are some other operations which are less frequently

performed on Data Structure . These are

Merging : Combing TWO or MORE Lists into a single List is Merging

Splitting : Dividing Single List into TWO or MORE Lists is Splitting operation

Copying : Creating a Duplicate copy of the List is known as copy operation

Sorting : Arranging the elements in Ascending or Descending order is known as Sorting


Algorithms
What is Computer ?

A manmade Machine which does not have decision making capabilities

Computer follows instructions given by the User

Instructions given to the Computer to solve a particular problem are known as Algorithm

Algorithm can be defined as :

1. Finite collection

2. Well defined steps

3. To Solve a particular Problem


Algorithms

Algorithm must have following characteristics :

1. Input : An Algorithm must take some Input that are required for the solution of the problem

2. Process : An Algorithm must perform certain operations on the input data which are
necessary for the solution of the problem

3. Output : An Algorithm should produce certain Output after processing the Input

4. Finiteness : An Algorithm must Terminate after performing some finite number of steps

5. Effectiveness : Every step of an algorithm should play a role in the solution to the problem

Each Step must be Unambiguous , Feasible and Definite

You might also like