I\'m going through some programming interview question books, and I\'ve seen reference to \"O(|A|)\"
time complexity. I\'ve never seen this notation with the a
You will see this notation always when A
is not a number.
A
could be many things, so |A|
depends on the context. E.g.
A
is a vector of a lattice, so |A|
is the length of the vector.A
is an (maybe unknown) algorithm (e.g. an attacker to an encryption), then |A|
could be the complexity of this algorithm or the length of the random bit vector this algorithm uses.A
is a set, then is |A|
the number of elements in the set, as Kostub Deshmukh mentioned.There can be many more cases.