Reputation: 588
Big O notation represents how long a method takes to run as input gets larger.
Does it (the formula) also represent space complexity?
Upvotes: 1
Views: 540
Reputation: 544
Yes. Big-O notation is used to represent Space Complexity. Big-O notation in Space complexity is similar to that of Time complexity. It represents the "maximum amount of space used by the algorithm at anytime".
Upvotes: 2