(The notation `` '' denotes here and in the problems
below base-2 logarithms.)
(Hint: Construct an upper bound for the value of the sum
using the term, and a lower bound using the term
.)
selectsort():
(
) for
to n-1 do
(
) {
;
;
(
) for
to n do
(
) if A[j] < amin then
(
) {
;
}
(
)
;
}
}
function;
begin
(
) if n=1 then return (A[1],A[1])
else begin
(
)
;
(
)
![]()
(
) return
![]()
end
end
.