Can the symbol $∈$ mean relation between elements?

107 Views Asked by At

Long time no see math concepts.

but as I want to improve in programing I need to get into some math concepts and symbols for understanding time complexity.

I saw this explanation in a problem that I solved:

"Because of $h ∈ O(n)$, the space complexity is $O(n)$."

Does this mean that $h$ relates to $O(n)$?

In such a way that if $n$ grows $h$ can grow, and if $n$ decreases $h$ can decrease?

I make sense to me but as far as I know, this symbol ($∈$) was used to tell a number belongs to a certain set

like $x$ belongs to real numbers, $x \in \mathbb R$.

1

There are 1 best solutions below

3
On BEST ANSWER

$h\in O(n)$ means that $h$ is in (is a member of) $O(n).$ $O(n)$ is a space/set, while $x$ is an object or member in that space/set. But $O(n) \notin O(n)$. So $h$ and $O(n)$ are not both elements of $O(n$. Likewise, $\mathbb R$ is the set of real numbers, and the notation $x\in \mathbb R$ means that $x$ is an number/object that resides in the set $\mathbb R$.