Question: Can anyone help me solving these three Computer Science problems? 1.) A Pokemon Card connoisseur has acquired several different cards. If a binary search was
Can anyone help me solving these three Computer Science problems?
1.) A Pokemon Card connoisseur has acquired several different cards. If a binary search was used to see if he own card #20, which of the following numbers would be compared before the search ends? Select all that are correct and explain why.
int cards [10] = {1, 5, 8, 9, 14, 17, 22, 23, 26, 30};
Possible Choices: 1, 5, 8, 9, 14, 17, 22, 23, 26, 30.
2.) Dr. Robotnik is working on the fuel efficiency of his Death Egg. He has 10 data elements that need to be sorted.
float fuel[10] = {7.2, 8.6, 4.8, 6.3, 2.1, 7.4, 9.8, 5.7, 6.2, 7.1};
What value would be in fuel[7] after 3 swaps of an ascending selection sort and how many total swaps would happen after 2 passes using a descending order bubble sort? Please explain.
Possible Choices(ascending selection sort): 7.4, 6.2, 8.6, 5.7
Possible Choices(descending bubble sort): 10, 750, 375, not able to know
3.) A movie critic has acquired several DVDS of Steven Spielberg films. If a quicksort is incorporated to arrange the films in order, what would the following array appear like after 2 recursive iterations of the quicksort function? Explain your answer.
int films [10] = {22, 30, 1, 8, 23, 5, 9, 17, 26, 14};
Possible Choices:
14 1 8 22 5 9 17 23 26 30
1 5 22 8 23 30 9 17 26 14
1 5 8 9 14 17 22 23 26 30
17 1 8 14 5 9 22 23 26 30
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
