Answer :

Answer:

n2.

Explanation:

The function with the time complexity of n2 is the fastest growing function is in terms of square.As n increases the time complexity will grow very rapidly.

n=1   n2=1

n=2   n2=4

n=3   n2=9

n=4   n2=16

n=5   n2=25.

The slowest growing function among them is log n then n and then n log n.

n log n is better than n2.

Other Questions