Neco 2019 Computer Studies Question 19
Practice objective / multiple choice question 19 from the 2019 Neco Computer Studies examination.
A program implements insertion sort on an array of \(n\) distinct integers and counts the number of key comparisons performed. For \(n = 20\) the program reports 190 comparisons. Assuming the input is a random permutation, the expected number of comparisons for insertion sort is \(\frac{n(n-1)}{4}\) and the variance is \(\frac{n(n-1)(2n+5)}{72}\). (a) Compute the expected number of comparisons and the standard deviation for \(n = 20\). (b) State whether the observed count of 190 comparisons lies within one standard deviation of the expected value.
Answer Options
About This Question
This is Neco 2019 Computer Studies Question 19. It is one of the objective questions from the 2019 Neco Computer Studies examination.
Difficulty level: Medium .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.