Interview Question | Software Engineer | What is Big-O notation?
You are expected to demonstrate essential understanding about Big-O notation and how it analyses the complexity of an algorithm. The question may also get accompanied by a given operation to which you will have to identify which category of performance/ complexity classes the operation falls into.
The answer must define big-O notation. Big-O notation is used in computer science to describe the performance or complexity of an algorithm. It describes how the runtime or space requirement of a function grows as the input grows. The following are the complexity classes:
- Constant-time
- Logarithmic
- Linear
- Polynomial
- Exponential
- Factorial