Spatial Complexity and Big O notation

Asked 2 years ago, Updated 2 years ago, 110 views

While studying, I found the expression "~~using O(n) storage". Since this is Big O storage, wouldn't it be related to spatial complexity? That's what I thought We did some research on the complexity of space complexity.

https://m.blog.naver.com/demonic3540/221229805234 This article explains the spatial complexity very well They say, "Space complexity is n+1." They don't say, "Space complexity is O(n).

Q: Is there a case where spatial complexity is expressed in Big O notation?

(Of course, it is understood that using O(n) storage, which first reminded me of this question, uses linear memory for some n inputs.)

big-o space-complexity

2022-09-22 14:58

1 Answers

Notation is simply a notation,

Thinking independently of time/space complexity...

In terms of time complexity, the maximum n2 like a double iteration is written as O(n2)22)

I think it's possible to see it as a performance cap for a particular algorithm.

In space complexity,

May have only one specific memory is of

and

.

Or you may need n + 1, but

Wouldn't it be possible to write like O(n*m) to mean that the maximum number of n*m won't go over?

https://www.quora.com/How-do-we-calculate-space-complexity

If you look at the comments here, Because notation itself is just a way of expressing incremental patterns It's actually expressed in Big O notation.


2022-09-22 14:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.