Hi,
Here, N = 20 and K = 4
Total numbers of comparison = (1/2)*N*(N/K - 1)
Note: Formula used here is already explained by sir in the lecture 4.3. It will good for your understanding if watch the lecture. Try to derive the formula by yourself after going through the lecture once.
So, the total numbers of comparison = (1/2)*20*(20/4 - 1) = 0.5*20*(5 - 1) = 10*4 = 40.
If you still have some doubt please write us again.
Regards,
Deepak
IITM Online Degree Team