If a machine needs 200 seconds fp sort 200 bills by using bubble sort ,how many bills will it sort in 800 seconds
Answers
A machine took 200 seconds to sort 200 bills with the use of bubble sort.
Sorting 200 bills make the comparison as 2008* 199/2 = 19900 comparison.
In 800 sec, it will sort 80000 comparisons 800= 4x200,
find n, n (n-1)/2 = 80,000, so n= 400.
400 bills will be sorted in 800 seconds.
Answer:
In 800 seconds it sort 800 bills by using bubble sort.
Step-by-step explanation:
Explanation:
Given , a machine need 200 seconds to sort 200 bills by using bubble sort .
So , In 200 seconds = 200 bills
Therefore , 1 second = = 1 bills .......(i)
Here , we have in 1 second it sort 1 bills by using bubble sort .
Now , multiply with 800 second in (i) than we get the number of bills in 800 second .
⇒In 800 seconds = 800 bills .
Final answer:
Hence , 800 bills will it sort in 800 seconds .
#SPJ3