Rate of Growth in Data Structure and Algorithm

Rate of Growth refer to the percentage change of a specific variable within a specific time period.

What is the Rate of Growth?

The rate at which The running time increases as a function of input is called the rate of growth.

Let us assume that you go to a shop to buy a car and a bicycle. If your friend sees you there and asks what you are buying, then, in general, you say buying a car. This is because the cost of the car is high compared to the cost of the bicycle (approximating the cost of The bicycle to the cost of the car).

  Total Cost = cost_of_car + cost_of _blcycle
Total Cost = cost_of _car (approximation)

For the above-mentioned example, we can represent the cost of the car and the cost of the bicycle in terms of function, and for a given function ignore the low order terms that are relatively insignificant (for large value of input size, n). As an example, in the case below, n4, 2n2, 100n, and 500 are the individual costs of some function and approximate to n4 since n4 is the highest rate of growth.

n4 + 2n2 + 100n + 500 = n4

Also read

Commonly Used Rates of Growth

The diagram below shows the relationship between different rates of growth.

Rate of Growth

Below is the list of growth rates you can be seen anywhere

Time ComplexityNameExample
1ConstantAdding an Element to the front of the linked list.
lognLogarithmicFinding an Element in sorted Array.
nLinearFinding an Element in Unsorted Array.
nlognLinear LogarithmicSorting n items by ‘divide-and-conquer’ – Merge sort.
n2QuadraticThe shortest path between two nodes in a graph.
n3CubicMatrix Multiplication.
2nExponentialThe Towers of Hanoi problem.

Learn more about Rate of Growth.

Thank You !!

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on whatsapp
WhatsApp
Share on reddit
Reddit
Share on telegram
Telegram

1 thought on “Rate of Growth in Data Structure and Algorithm”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top