[go: up one dir, main page]

0% found this document useful (0 votes)
7 views15 pages

DSA Lecture 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views15 pages

DSA Lecture 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Data Structure and Algorithms

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.

•Information: data with given attributes or meaningful or processed data.


What is Data Structure

• In Computer Science, a data structure is a particular way of organizing data in a computer so


that it can be used efficiently.

• 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

In order to do that, we need to identify:


1. The collection of data items
2. Basic operation that must be performed on them

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

You might also like