The assymptotic notation informs you about how execution time grows with growing input, and that does not let you do such comparisons like "for V = 10, E = 15
I get that value smaller than the other".
If you have two algorithms, with time complexities O(V^2 + E)
and O(E log V)
, the only thing you can say is that the first one works better for dense graphs and the other for sparse graphs (by supposing V^2 = E
for dense and V = E
for sparse).