InterviewSolution
Saved Bookmarks
| 1. |
Consider the following key set: 42, 29, 74, 11, 65, 58, use insertion sort to sort the data in ascending order and indicate the sequences of steps required. |
|
Answer» Insertion sort: Step-1 - ∞, 42, 29, 74, 11, 65, 58 Step-2 - ∞, 29, 42, 74, 11, 65, 58 Step-2 - ∞, 29, 42, 11, 74, 65, 58 Step-4 - ∞, 29, 42, 11, 65, 74, 58 Step-5 - ∞, 29, 42, 11, 58, 65, 74 Step-6 - ∞, 11, 29, 42, 58, 65, 74 |
|