I am still kinda new to programming and I have a questions (yes it is a homework question), but I am not looking for you to give me the answer. I would like someone to explain to me how to go about determining the number of key comparisons for an insertion sort. The book really doesn't explain it at all, but yet it asks us to figure it out. So the book gives us the following list of keys: 18, 8, 11, 9, 15, 20, 32, 61, 22, 48, 75, 83, 35, 3.
I would like to know how to go about counting up the number of key comparisons for an insertion sort so that I can find the answer to this myself. Any help is much appreciated. Thanks!