DSA Lecture 1
DSA Lecture 1
LECTURE - 1
Data and Information
•Data : Data are simple values or set of values
•Data item: single unit of values
• Group items: that are divided into sub items- name.
• elementary types: that cannot be divided- social security number.
• The logical or mathematical model of a particular organization of data is called a data structure.
◦ A data structure is defined by
(1) the logical arrangement of data elements, combined with
(2) the set of operations we need to access the elements.
Classification of Data Structure
1. Primitive
1.1 Integer
1.2 Real
1.3 Character
1.4 Boolean
2. Non-Primitive
2.1 Linear
2.1.1 Arrays
2.1.2 Linked List
2.1.3 Stack
2.1.4 Queue
2.2 Non-Linear
2.2.1 Trees
2.2.2 Graph
Solving a problem involves processing data, and an important part of the solution is the careful
organization of the data
Abstract Data Type (ADT): a collection of data items together with the operations on the data
◦ The word “abstract” refers to the fact that the data and the basic operations defined on it are being studied
independently of how they are implemented
◦ We think about what can be done with the data, not how it is done
Implementation of ADT
The term of Data Structure and Abstract Data Type are often used interchangeably
However, we use ADT when data is studied at a logical level
The term data structure refers to a construct in programming language that can be used to store
data
ARRAYS
LINKED LIST
STACK
QUEUE
STACK VS. QUEUE
TREE & GRAPH
DATA STRUCTURE OPERATIONS
1. Traversing
2. Inserting
3. Deleting
4. Searching
5. Sorting
6. Merging