Lesson 1: Introduction To Data Structures and Algorithms
Lesson 1: Introduction To Data Structures and Algorithms
Algorithms
Lesson 1: Introduction to Data Structures and Algorithms
Lesson 1: Introduction to Data
Structures and Algorithms
1. Arrays
2. Linked lists
3. Stacks
4. Queues
5. Trees “Each serving specific purposes
6. Graphs based on the requirements of
the problem at hand.”
How Data Structure varies from Data
Type?
How Data Structure varies from Data Type?
• Divide
• Solve
• Combine
8. Greedy Algorithm
1. Best case: Define the input for which algorithm takes less time or minimum
time. In the best case, calculate the lower bound of an algorithm. Example: In
the linear search when search data is present at the first location of large data
then the best case occurs.
2. Worst Case: Define the input for which algorithm takes a long time or
maximum time. In the worst case, calculate the upper bound of an algorithm.
Example: In the linear search when search data is not present at all then the
worst case occurs.
3. Average case: In the average case take all random inputs and calculate the
computation time for all inputs. And then we divide it by the total number of
inputs. (Average case = all random case time / total no of case)
Sources
https://www.geeksforgeeks.org/data-structures/
https://www.geeksforgeeks.org/introduction-to-algorithms/
https://www.geeksforgeeks.org/what-is-algorithm-and-why-analysis-
of-it-is-important/
https://www.linkedin.com/pulse/algorithm-complexity-understanding-
time-space-devender-
singh#:~:text=The%20average%2Dcase%20time%20complexity,size
%20of%20the%20input%20data.