What does it mean for a graph to have O(|V|) edges?

78 Views Asked by At

I'm doing a problem that begins with "Show that if G has O(|V|) edges...". Without tackling the substance of the problem, I'd like a formal definition of what exactly it means for G = (V, E) to have O(|V|) edges.

Intuitively, I think it means that given V, a graph G = (V, E) has O(|V|) edges if there is an algorithm that constructs the edges E that runs in O(|V|) time.

Is this intuition correct? Is there a more formal way to put it?