1.1 Introduction Flashcards
What is an algorithm?
An algorithm is finite set of steps for solving a specific problem
What are the characteristics of an algorithm?
- Finiteness
- Definiteness
- Input/Output
- Generality
- Effectiveness (every step can be converted to a programming language)
What are the categories of algorithms?
- Sequential
- Iterative
- Selective
What is the time complexity of an algorithm?
This is how much time is required for an algorithm to complete its execution
What is the space complexity of an algorithm?
This is how much memory is required for an algorithm to complete execution.
What is asymptotic analysis?
This is the mathematical analysis of the time or space required for an algorithm’s completion
What are asymptotic notiations?
The mathematical notations used for asymptotic analysis
Differentiate between the best, worst, and average case time complexity of an algorithm.
Best Case: The minimum amount of time required for the algorithm to complete execution
Average case: The typical amount of time required by an algorithm to complete the execution
Worst Case: The maximum amount of time required by an algorithm to complete execution
What are the different asymptotic notations and their uses?
Big Oh (O): This is the notation used to represent the upper bound or worst-case complexity of an algorithm.
Omega: This notation is used to represent the best-case scenario or lower-bound of an algorithm
Theta: This notation is used to represent both the upper and lower bounds of an algorithm