+ 4
What is the complexity of an algorithm?
What is the space time tradeoff of algorithms?
2 odpowiedzi
+ 2
Complexity is basically the amount of space and time required by a program while execution .
It is of two types:
a) time complexity : time required by code while execution.
b) space complexity: memory required by code while execution .
Space time tradeoff: whenever we try to improve our time complexity (making it less time or more faster) we will increase space complexity and vice versa. In other words , we can say that it has an inverse relationship. We will have to compromise with one while improving another .Deciding factor depends upon the application requirements.
Hope it helps