ā Question
Using Figure 2.2 as a model, illustrate the operation of INSERTION-SORT on an array initially containing the sequence <31, 41, 59, 26, 41, 58>
š” Answer
p q r 31|41|59|26|41|58Divide
p q r p q r 31|41|59 26|41|58Divide
p,r p,q r p,r p,q r 31 41 | 59 26 41 | 58Divide
p,r p,r p,r p,r p,r p,r 31 41 59 26 41 58Merge
p,r p,q r p,r p,q r 31 41 | 59 26 41 | 58Merge
p,q r p,q r 31|41 | 59 26|41 | 58Merge
p q r 26|31|41|41|58|59