--

Of course! n^2 means for every element we run something on every other element. 2n means we simply iterate through the list two times.

So, xn means we iterate through n x times; think of it like, instead of a nested for loop (which would be n^2) it’s just x consecutive for loops.

I know that, technically speaking big O means upper bound, but I felt that if I did big Omega with full precision no one would really understand what I meant.

--

--

No responses yet