Suppose that the splits at every level of Quicksort are in proportion $1-\beta \text{ to } \beta$, where $0 < \beta \leq 0.5$ is a constant. The number of elements in an array is n. The maximum depth is approximately
Show the worked solutionThe deepest path follows the larger part, of relative size \(1-\beta\ge\frac12\). After \(d\) levels its size is \(n(1-\beta)^d\), which reaches 1 when\[n(1-\beta)^d=1\ \Rightarrow\ d=\frac{\lg n}{\lg\frac{1}{1-\beta}}=-\frac{\lg n}{\lg(1-\beta)}.\]Option C, \(-\lg n/\lg\beta\), is the minimum depth (following the smaller part).Answer: D
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com