2, 5, 8, 4, 1, 7, 6, 3
break them in 2 halves.
2, 5, 8, 4, 1, 7, 6, 3
Break each of them in 2 halves.
2, 5, 8, 4, 1, 7, 6, 3
Break each of them in 2 halves.
2, 5, 8, 4, 1, 7, 6, 3
Sort and combine adjacent 2 at a time by comparing them.
2,5 4,8 1,7 6,3
No of comparisons done? = $4$
Sort and combine adjacent 2 at a time by comparing them.
2,4,5,8 1,3,6,7
No of comparisons done? = 3+3=$6$
Notice that in 1st case you compare 2 and 4 and select 2. Then compare 4 and 5 and select 4. Then compare 5 and 8 and select 5. Now no need to compare 8 with anything just select it at last. So total 3 comparisons.
Sort and combine adjacent 2 at a time by comparing them.
1,2,3,4,5,6,7,8
No of comparisons done? = 7 for a similar reason as above.
So total = 4+6+7=$17$