In: Advanced Math
The Binary Insertion Sort Algorithm is a variation of
the Insertion Sort Algorithm that uses a binary search technique
rather than a linear search technique to insert the ith
element in the correct place among the previously sorted
elements.
(i) Express the Binary Insertion Sort Algorithm in
pseudocode.
(ii) Compare the number of comparisons of elements used by the
Insertion Sort Algorithm and the Binary Insertion Sort Algorithm
when sorting the list (7,4,3,8,1,5,4,2).
(iii) Show that the Insertion Sort Algorithm uses
O(n2) comparisons of elements.
(iv) Find the complexity of the Binary Insertion Sort Algorithm. Is
it significantly faster than Insertion Sort?
need help with discrete math HW, please write solutions clearly, and please don't just answer wrong solution, cus then i will need to post the same question twice. i appreciate every help i can get but please let someone else help me solve the question if you're not sure about any part to avoid reposting. thanks, will rate best answer.