algorithm - Time Complexity for Quick sort -



algorithm - Time Complexity for Quick sort -

suppose b(n) , w(n) respectively best case , worst case asymptotic running times sorting array of size n using quick sort.

now consider 2 statements:(i) b(n) o(w(n)) (ii) b(n) theta(w(n))

among these 2 1 right statement?

ps: worst case : n^2 best case : nlogn

what think true b(n) smaller w(n), can b(n) have same order of growth of w(n)

the former correct. trick less complex classes subsets of more complex classes, algorithms run in o(n) run in o(n^2). theta tighter bound, in case of quicksort tight capture b(n).

algorithm time-complexity quicksort

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -