Skip to first unread message

Gada Electronics

unread,
Nov 11, 2020, 5:14:55 AM11/11/20
to Discussion forum for Computational Thinking
Respected Sir/Ma'am,
Kindly help me out with the following questions.
1. Assume that we can distribute the 20 objects into bins of equal size. If we go with four bins, how many comparisons would we have to make overall?
Thank you

Computational Thinking Support 2

unread,
Nov 11, 2020, 6:45:56 AM11/11/20
to Discussion forum for Computational Thinking, Gada Electronics
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

Salazar Slytherin

unread,
Nov 11, 2020, 8:15:31 AM11/11/20
to Computational Thinking Support 2, Discussion forum for Computational Thinking
Thank you for the clarification. 
Reply all
Reply to author
Forward
0 new messages