Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Types of Data Structures

&
Algorithm Characteristics

Dr. V.Sireesha
Dept. of CSE
Types of Data Structures
Definition: A Data structure is a data organization,
management and storage format that enables efficient
access and modification
Types of Data Structures
 Primitive Data Structures: These are basic data
structures that directly operate upon the machine
instructions.
Example: Integer, Float, Char, Double and Pointer

 Non-primitive data structures are derived


from primitive data structures.
 They emphasize on grouping same or different data
items with relationship between each data item.

 Non-Primitive DS further divided in to two type:


Linear (Sequential): Arrays, Linked Lists, Stacks, Queues
Non-Linear (Random): Trees, Graphs
Arrays - Linear DS
Linked List - Linear DS
Stacks - Linear DS
Queues - Linear DS
Trees - Non Linear DS
Graphs- Non Linear DS
Operations on Data Structures

 Read / View
 Write / Store
 Searching
 Sorting – Ascending / Descending
 Insertion
 Deletion
 Updation
Algorithm- Introduction
 The word algorithm itself is derived from
the 9th-century mathematician Muḥammad
ibn Mūsā al-Khwārizmī, Latinized Algoritmi;
English term 'algorithm' is first attested in
the 17th century

 An algorithm is a step by step procedure to


solve a problem.

 It is a finite set of well defined instructions


that specifies a sequence of operations to
be carried out to solve a specific problem.
Need for Algorithm
 Algorithm is the best method of description
without describing the implementation details. It
is used to measure the behavior (or
performance) of the methods in all cases (best
cases, worst cases, average cases).

 With the help of an algorithm, we can also


identify the resources (memory, input-output)
cycles required by the algorithm.

 We can also measure and analyze the complexity


(time and space) of the problems concerning
input size without implementing and running it
thus reducing the cost of design.
Algorithm Specifications / Characteristics
 Every algorithm must satisfy the following
specifications:

1. Input - zero or more number of input values should be


externally supplied.
2. Output - Must produce atleast one output as result.
3. Definiteness - Every statement/instruction in an
algorithm must be clear and unambiguous
4. Finiteness - It must produce result within a finite
number of steps.
5. Effectiveness - Every instruction must be basic enough
to be carried out and it must be feasible and effective in
terms of space and time.
Thank You

You might also like