Answer:
I think its c I'm not sure
Answer: You would get 20 heads and 20 tails.
Explanation: Assuming that the coin is fair which you said it is, then you can also assume that there’s a 1/2 probability of getting heads each time you flip it and tails each time you flip it. So since you flipped it 40 times, you would assume to get heads 20 times and tails 20 times.
Answer:
The running time is quadratic (O(n²) )
Step-by-step explanation:
For the set up, we have a constant running time of C. The, a log-linearsorting is called, thus, its execution time, denoted by T(n), is O(n*log(n)). Then, we call n times a linear iteration, with a running time of an+b, for certain constants a and b, thus, the running time of the algorithm is
C + T(n) + n*(a*n+b) = an²+bn + T + C
Since T(n) is O(n*log(n)) and n² is asymptotically bigger than n*log(n), then the running time of the algorith is quadratic, therefore, it is O(n²).