Algorithm and Complexity

Algorithm and Complexity

Problem Description:

What does it mean when we say that an algorithm X is asymptotically more efficient than Y?

we consider the growth of the algorithm in terms of input size. I am not getting the concept properly.

Solution – 1

The growth of algorithm appears when we use containers such as Array,stack,queue and other data structures.If an array size is taken from the user then it will take O(N)(big-oh of N size) in terms of space complexity.

In terms of Time complexity, if there is any loop in the program running for n number of time then it will take O(N)(big-oh of N) time complexity.

These are the two main attributes while judging the growth of any algorithm.

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.