When implementing Insertion Sort, a
binary search could be used to locate the position within
the first i-1 records of the array into which
record i should be inserted. Using binary search will:
\Theta(i) time\Theta(\log i) time\Theta(i) timeThe position at which to insert could be found in
\Theta(\log(i)) steps, but shifting the records to make
room for the this record will require \Theta(i) time.