1. Fundamentals of Data Structure
Ms. Vrushali Dhanokar
Email id- dhanokarvrushali@gmail.com
2. Why we learn this subject?
• In real life we used data structure everywhere.
For example
In organization, Student database. We can stored large amount of data in
appropriate sequential manner. We can sort those data according the functionality.
By using primary key i.e. unique id we can access those data. It’s also easy for
searching purpose.
A file system is a method for storing and organizing computer files and the data
they contain to make it easy to find and access them for this purpose they used
Tree data structure.
Google maps used graph data structure for finding the shortest path.
Queue data structure used in networking for transferring files in FIFO format.
Etc.
3. What is Data Structure?
• Data structure is the way of organizing data in computer so it can be used more
effectively.
• Data structure is collections of data values and relationships among them and
different functions and operations applied on data.
4. What is Data?
What is Data Object?
Data- Data is collections of information. It includes integers, alphabets,
numbers, symbols etc.
Properties of Data-
1. Atomic – Single concept and can’t be divided into smaller parts.
2. Traceable – Relationship and connection with other elements.
3. Accurate – Accuracy, valid and unambiguous data.
4. Clear and concise - Easy to understand.
Data Object – Data object is the storage where all values or group of
values are stored. Variables, Constants, Signals etc.
6. Types of Data Structure
1. Primitive Data Structure:
These data types are available in most programming languages as built in
type. It can be operated on machine level instruction. For e.g. Integer,
Pointer, Real, Boolean, Float, Double, Characters etc.
2. Non Primitive Data Structure:
A set of homogeneous and Heterogeneous data elements are stored
together. For. E.g. Insert, Delete, Update, Search etc.
7. Types of Data Structure
1. Linear Data Structure:
Its elements form a sequence or linear list. The data arrange in linear
fashion the way they are stored in memory. For e.g. Stack, Queue etc.
2. Non-Linear Data Structure:
It’s elements are not arrange in sequence. Every data elements can have
no. of predecessors as well as successors. For e.g. Tree, Graph etc.
8. Types of Data Structure
1. Static Data Structure:
It’s size of data structure is fixed. The content of data structure can be
modified but without changing the memory space allocated to it. For e.g.
Array.
2. Dynamic Data Structure:
It’s size of structure is not fixed and can be modified during the operations
performed on it. It change the data structure at run time. For e.g. Linked List.
9. What is Algorithm?
• An algorithm is finite set of instructions.
• An algorithm is step by step procedure of execution of program.
Properties of Algorithm-
1. Input – Zero or more quantities.
2. Output – At least one quantity.
3. Definiteness – Every instructions must be clear.
4. Finiteness – Algorithm will terminate after finite number of steps.
5. Effectiveness – Every instructions are feasible and easy to understand.
10. What is Algorithm Analysis?
• It is a technique that measure the performance of algorithm.
• It provides user-friendliness, Usage space, security, maintainability that
determines quality of algorithm.
• Types of algorithm analysis-
Priori Analysis - Done before implementation.
Posterior Analysis – Done after implementation.
11. Why study of algorithm is important?
Algorithms help us to understand scalability.
Performance often draws the line between what is feasible and what is
impossible.
Algorithmic mathematics provides a language for talking about program
behavior.
Modularity, Correctness, Maintainability, Robustness, User
friendliness, Programming time, Simplicity, Reliability etc.
It’s important for good performance.
12. Algorithm Complexities
1. Time complexity-
This is a function describing the amount of time an algorithm takes in
terms of amount of input to the algorithm.
Time can means no. of comparisons between data types, inner loops are
executed.
Time also can be calculated which language, hardware, program or
compiler is used.
Time complexity = Compile time + Run or Execution Time.
It is measured by Best case, Average case and Worst case asymptotic
notations.
13. Algorithm Complexities
2. Space Complexity-
Space complexity of an algorithm represents amount of memory space
required by the algorithm in its life cycle.
Two types of spaces are required-
Fixed part- It required to store certain data and variables that are
independent size of problem. For e.g. Constants, Program size etc.
Variable part- It required by variables whose size depends on size of
problem. For e.g. Dynamic memory allocation.