As here we have $P1,P2,.,……,Pn$ points in the $X-Y$ $plane$ and among them no three are collinear .
and for the steepest slope as we know $slope=tanӨ= (y2-y1)/(x2-x1)$
so the for the steepest slope $(i.e$ $90°)$ because for the other slopes (whether it be greater than 90° or not will not be the steepest) .
now lets , maintain an array for all the points that we have in the $X-Y$ plane .in sorted order $[Ө(nlogn) ]$
P1 |
P2 |
P3 |
P4. |
P5 |
P6 |
|
. . |
………………………….. |
Pn |
now lets ,
fix one point $(start$ $with$ $P1)$
selecting $P1$ will take constant time now in the array from ($P2$ $to$ $Pn$) perform $binary$ $search$ and for every point that we will get we have to calculate the slope between that point and $P1$ so this process will take ( $Ө(logn) + c$) constant time for just performing the computations for the slope.
similarly do it for all the points till $Pn$ (in the worst case).
so for selecting $constant$ $time$ is required and we are selecting all the points and performing binary search on rest of the points in the array.
so TC will be
$TC = Ө(1)*Ө(n)$ [for selecting all points once] * $Ө(logn)$[for binary search everytime] + $Ө(nlogn)$ [for sorting the array]
so, $TC$ = $Ө(nlogn)$ + $Ө(nlogn)$ = $Ө(nlogn)$
$OPTION$ $B$ $IS$ $CORRECT!$