Lect 1 - DS - ADT
Lect 1 - DS - ADT
Theory
Quiz 1- 20
Quiz 2- 20
Assignment - 10
End Sem – 50
Lab
Continuous Assessment- 20
Mid Sem – 30 (1program- 20m, viva -10m)
End Sem – 50 (2program- 40m, viva -10m)
It is a core subject in Computer Science and Engineering
Slides taken from various resources from Internet
Data Structures
Data structure is a representation of data and the
operations allowed on that data.
It is a way of organizing the data.
Examples:
Bank account details
Students details
Employee details
Linear/ Non-linear DS
•3
Manufacturer Benefits:
easy to modify, maintain
profitable
reusable
Client Benefits:
simple to use, understand
familiar
cheap
component–based
How Well are ADTs Supported in C
?
•12
No
C++ and OOP
•13
myNumbers.add(10);
myNumbers.add(15);
myNumbers.add(20);
myNumbers.add(25);
System.out.println(myNumbers);
}
}
In C
•16
In Java- LinkedList ADT
1.import java.util.*;
2.public class LinkedList1{ Output:
3. public static void main(String args[]){ Ravi
4. LinkedList<String> al=new LinkedList<String>(); Vijay
5. al.add("Ravi"); Ravi
6. al.add("Vijay"); Ajay
7. al.add("Ravi");
8. al.add("Ajay");
9. Iterator<String> itr=al.iterator();
10. while(itr.hasNext()){
11. System.out.println(itr.next());
•import java.util.*;
• // Driver code
• {
• l.add(10);
• l.add(15);
• l.add(20);
• System.out.println(l);
• }
•}
Summary