Zimbabaluba
Zimbabaluba

Reputation: 588

Does Big O notation also represent space complexity?

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

Answers (1)

tourist
tourist

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

Related Questions