CS 101: Data Structures and Algorithms: Unit I Lecture 7: Introduction To DS

You might also like

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

CS 101: Data Structures and Algorithms

Unit I
Lecture 7: Introduction to DS
Dr. Ajay S. Patil
School of Computer Sciences, KBC NMU, Jalgaon (Maharashtra)
What we have studied so far …
• Discussion of some prerequisites
• What is Data Structure?
Syllabus of Unit I:
• Types of Data Structures
• Abstract Data Types
Introduction to Data Structures
• Algorithmic Notations
and Algorithms:
• Format Conventions
• Statement and Control Structures
Data types and Abstract data types,
• Name, Introductory Comment, Steps, Comments,
Types of Data structures;
Assignment,
Primitive, Non primitive, Linear and
• if-then, if-then-else, select case
Nonlinear Data structures
• repeat for, repeat while, repeat step … through
• Go To, Exitloop and Exit Statements, Variable names
Algorithmic Notation:
• Data structures: (Non-primitive) Array, Dynamic
Format Conventions,
Storage
Statement and Control Structures.
• Arithmetic Operations and Expressions
• Relations and Relational Operators
• Logical Operations and Expressions Time and Space Analysis
• Input and Output
• Sub Algorithms: Functions, Procedures
What we will study today …

Time and Space Analysis

Web References:

• http://users.cecs.anu.edu.au/~Alistair.Rendell/Teaching/apac_comp3600/module1/growth_
of_functions.xhtml
• https://www.studytonight.com/
Asymptotic Notation
Constant 1

Logarithmic log n

Linear n

Quadratic n2

Cubic n3

Factorial n!
2n
Exponential
O Notation ( pronounced as Big O Notation) Asymptotic Upper Bound (Worst Case)
For a given function, g(n) , we denote by O(g(n))
the set of functions, O(g(n)) = { f(n): there
exist positive constants c and n0 such that
0≤f(n)≤cg(n) for all n≥ n0 }.
 Notation ( pronounced as Big Omega Notation): Asymptotic Lower Bound (Best Case)
For a given function, g(n), we denote by Ω(g(n))
the set of functions, Ω(g(n)) = { f(n): there
exist positive constants c and n0 such that
0≤cg(n)≤f(n) for all n≥ n0 }.
 Notation (Pronounced as Theta notation): Average Case
For a given function, g(n), we denote by Θ(g(n)) the
set of functions Θ(g(n)) = { f(n): there exist
positive constants c1 , c2 , and n0 such that
0≤ c1 g(n)≤f(n)≤ c2 g(n) for all n≥ n0 }.
Thank You All !

You might also like