Module 1 - Introduction to DSA
Module 1 - Introduction to DSA
) Program in Information
Technology Semester – II
Course Name: Data Structures and Analysis
(Course Code: ITC302)
Module – 1
Introduction to Stacks, Queues and Linked Lists
(DS considers not only the elements stored but also their
E.g. Array
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
• Organized data
• Optimal performance
• Scalability
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
Rank
track whether there are enough operands for each operator and
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
Rank
expression).
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
Rank
Postfix Expression: 3 4 + 5 *
•Initial Rank: 0
Final Rank: 1
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
Rank
This final rank of 1 indicates that exactly one value (the result of
the entire expression) remains, which is what we expect for a
well-formed expression.
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
Asymptotic Notations:
•Asymptotic Notations are mathematical tools used to analyze the performance of algorithms by
understanding how their efficiency changes as the input size grows.
•These notations provide a concise way to express the behavior of an algorithm’s time or space complexity
as the input size approaches infinity.
•Rather than comparing algorithms directly, asymptotic analysis focuses on understanding the relative
growth rates of algorithms’ complexities.
•It enables comparisons of algorithms’ efficiency by abstracting away machine-specific constants and
implementation details, focusing instead on fundamental trends.
•Asymptotic analysis allows for the comparison of algorithms’ space and time complexities by examining
their performance characteristics as the input size varies.
•By using asymptotic notations, such as Big O, Big Omega, and Big Theta, we can categorize algorithms
based on their worst-case, best-case, or average-case time or space complexities, providing valuable insights
into their efficiency.
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
Theta notation encloses the function from above and below. Since it
represents the upper and the lower bound of the running time of an algorithm,
it is used for analyzing the average-case complexity of an algorithm.
Theta (Average Case) You add the running times for each possible input
combination and take the average in the average case.
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
Characteristics of algorithms:
• Well-described steps
• Input and output
• Finiteness
• Determinism
• Efficiency
• Generality
• Correctness
• Modularity and reusability
• Understandability
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor
DS
KJSIT, Sion – Data Structure and Analysis – ITC302 Dr. Harsh Namdev Bhor