Question: I need ansser for part b and c 1. This problem concerns insertion sort. Please answer all parts: (a) (4 points) Describe the insertion sort
I need ansser for part b and c
1. This problem concerns insertion sort. Please answer all parts: (a) (4 points) Describe the insertion sort algorithm at a high level. You should not refer to arrays, linked lists or any other data structures. (b) (3 points) If performed carefully, insertion sort can be done in linear-time for mostly sorted sequences (sequences with a constant number of out-of-order elements). Refine your description in the previous part to explain how this efficiency can be achieved. Again, please remain data-structure-agnostic. (c) (3 points) Achieving this efficiency is difficult when the sequence is implemented using a linked list. Explain the problem and how the data structure can be augmented to permit efficient insertion sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
