doubt -please explain this question

408 views
Skip to first unread message

Deepak Koyad

unread,
Nov 10, 2020, 4:48:17 AM11/10/20
to Discussion forum for Computational Thinking
As mentioned in the lecture, assume that a computer can do 108 comparisons in a second. How many seconds will it take for the computer to do pairwise comparisons of one million (1, 000, 000) elements?
 Nearly 5000 seconds
 Nearly 1000 seconds
 Less than 1 second
 Nearly 10 seconds

Computational Thinking Support 2

unread,
Nov 10, 2020, 5:35:44 AM11/10/20
to Discussion forum for Computational Thinking, Deepak Koyad
Hi Deepak,
Total no. of comparisons = 10^6*(10^6-1)/2 ~ 0.5*10^12
Time needed ~ (0.5*10^12)/10^8 ~ 5000 seconds

Hope you will understand if not write us again.

Regards,
Deepak
IITM Online Degree Team
Reply all
Reply to author
Forward
0 new messages