subject

You can actually find the median by running a sorting algorithm and stopping early, as soon as you know the median. (a) Assume you use Bubble Sort to find the median of 9 elements (i. e. n = 9), but stop as soon as you know the median. Exactly how many comparisons do you use (in the worst case)? (b) Assume you use Mergesort to find the median of 9 elements (i. e. n = 9), but stop as soon as you know the median. Exactly how many comparisons do you use (in the worst case)?

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:20, Hcalhoun21
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, amy7233
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
image
Computers and Technology, 24.06.2019 19:20, maehardy4134
Kiesha has a worksheet with a range of cells using the following columns: name, score, group, study group, and date. kiesha needs to sort the worksheet on the date field. which option she use to most efficiently complete this task ? a use the cut and paste option to reorganize the data to fit that order b use the filter function to organize the data based on the date c use the order function to organize the data based on the date d use the sort function to organize the data based on date order
Answers: 3
image
Computers and Technology, 24.06.2019 21:50, TamB01
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
Answers: 1
You know the right answer?
You can actually find the median by running a sorting algorithm and stopping early, as soon as you k...

Questions in other subjects:

Konu
Geography, 26.01.2020 05:31