The Gateway to Computer Science Excellence
0 votes
29 views
Show that quicksort’s best-case running time is $\Omega(n\ lg\ n)$.
in Algorithms by Boss (41.9k points) | 29 views

1 Answer

0 votes
the best case in quicksort is when elements is in unsorted order then the function has to run only f(n)=2T(n/2)+n

when the elements are is increasing or decreasing oder than f(n) value become f(n)=T(n-1)+n because then the pivot element either present in first position or last position so the number of comparisons becomes (n-1) for sorting.
by (11 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,430 answers
195,213 comments
99,927 users