AQ4.3: Activity Question 3 - Not graded

64 views
Skip to first unread message

Shubhra

unread,
Nov 16, 2020, 11:34:35 PM11/16/20
to Discussion forum for Computational Thinking
How to calculate the timind as I was driving the 10^6 with 10^8 . That was giving me 0.01 sec.
N

Computational Thinking Support 2

unread,
Nov 17, 2020, 12:03:04 AM11/17/20
to Discussion forum for Computational Thinking, Shubhra
Hi,
Number of comparisons can be done by computer in one sec = 10^8
Number of pairwise comparisons for 10^6 elements = 10^6*(10^6 - 1)/2 ~ 0.5* 10^12
So time taken by computer to do 0.5*10^12 comparisons = (0.5*10^12)/10^8 = 0.5*10^4 = 5000

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