Data structures and algorithm

255 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
255
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Data structures and algorithm

  1. 1. Lectures of Data Structures and Algorithm 08-Oct-13 Definition of Data Structure and Algorithm:The arrangement/manipulation of data by the compiler in computer memory. Types of Data Structure:1. Physical Data Structure 2. Logical Data Structure Examples of Data Structure:1. 2. 3. 4. 5. 6. Stat Queue => De-Queues Array Graph Sorting Tree *Physical DS:-. Physical memory of data by the translator. *Logical DS:Logical concept of data by the translator. 09-Oct-13 Types of Data Structure:1) Physical Data Structure:a) Linear Physical Data Structure(e.g. Array , Queue , Stat) b) Non-Linear Physical Data Structure(e.g. Link list, Tree, Graph) 2) Logical Data Structure:a) Linear Logical Data Structure b) Non-Linear Logical Data Structure Levels of Data Structure:Abstract Level Application Level Implementation Level 1) Abstract Level:In abstract way….. (sarsari tor per)
  2. 2. Extra:2) Application Level:Array:Source code adding on a thing.  Homogeneous  Sequential order  Not Flexible (Fix) 3) Implementation Level:Executable code adding on a thing. Link-List:- Bubble Sort:-  NonHomogeneous  Non-Sequential  Flexible Step 1 2 2 2 2 2 2 2 2 Step 2 9 9 4 4 4 4 4 4 2 2 2 2 2 2 Step 3 4 4 9 1 1 1 1 1 4 1 1 1 1 1 2 1 1 2 1 2 1 2 1 2 1 2 1 2 Logical method:while(a[i]>a[i+1]){ //Swaping;a=b 1 1 1 9 5 5 5 5 5 5 5 5 9 6 6 6 6 6 6 6 6 9 7 7 7 7 7 7 7 7 9 8 8 8 8 8 8 8 8 9 1 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 8 8 8 8 8 8 9 9 9 9 9 9 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 9
  3. 3. b=c c=a } Definition of Algorithm:Set of instructions is called Algorithm. OR Non-executable code is called Algorithm. It don’t have “;” or other statement ending words.

×