- In Computer science, we process and analyze the data.
- It is complex to analyze using an algorithm.
- It is very important to find the most efficient algorithm solve any problem.
- To solve any problem, number of algorithms was proposed. For example sorting and searching techniques.
- What is efficient and what to choose among available is the only challenge.
The time complexity is the number of operations an algorithm performs to compute the task. The efficient algorithm always performs smallest number of operations.
- The Statements also negligible.
- Only operations will be counted.
- n^2 + n + 1 —> O(n)
an^2 + bn + c
100n^2 + 50n + 1
Time complexity is :
100n^2 —> Big Oh notation