Big-O complexity Flashcards
cheat sheat
complexity ranges
ascending order:
1,logn,sqrt(n),n,nlogn,n^2,…,2^n,…..,n^n
Big O:
is an upper bound nearest representation
2n+3 . -O(n) or O(n^2 )….. . if function is n representation then all the values more than n like n^2,nlogn can be represented to O but best is nearest that is O(n)
4n^2+2 . O(n^2)
omega:
is an lower bound nearest representation
2n+3 . -omega(n),omega(logn) . if function is n representation then all the values less than n like logn can be represented to omega but best is nearest that is omega(n)
4n^2+2 . omega(n^2)
theta
Is a correct bound repreentation
2n+3 . -theta(n) if function is n representation then only n can be represented to theta
4n^2+2 . theta(n^2)