1 answer

Inal Examination 17. Which of the sorting algorithms listed below has the time fastest best case...

Question:

Inal Examination 17. Which of the sorting algorithms listed below has the time fastest best case run (a) Heap sort (b) Merge
Inal Examination 17. Which of the sorting algorithms listed below has the time fastest best case run (a) Heap sort (b) Merge sort (c) Quick sort (d) Insertion sort 18. Which statement below is false: (a) Quick uick sort and merge sort are divide and conquer algorithte (b) Counting sort is a linear time sorting algorithm. (e) Insertion sort and quicksort have similar best case (d) Generic minimum spanning tree algorithm is 19. Counting sort and radix sort are linked together since not greedy (a) counting sort is a stable sort. (b) counting sort is a linear sort (c) counting sort is a comparison sort. (d) None of the above 20. The array A [17,3,4,5,2, 13, 12 represents a nearly com completed binary tree. Build maximum heap produces which of the following arrays: (a) A-[17,5, 13,3, 2,12,4 (b) A [17,5, 13,3, 2,4, 12 (c) A-[17,5, 12,3, 2,13,4 (d) A [17,3,13,5, 2, 12,4] 21. The worst case asymptotic time to heap sort an array of length n is: (a) O(lg n) (b) O(n) (c) O(n Ig n) (d) None of the above. 22. Which statement below is true: (a) Counting sort is an in place sorting algorithm. (b) Heapify runs in Θ(n). (c) Heapsort is a divide and conquer algorithm (d) Insertion sort's best case run time always runs in fewer steps than Heap Sort

Answers

17 d) Insertion sort

insertion sort O(n) in best case where rest of them have O(nlogn )

18 c) insertion sort and quick sort have similar best case asymptotic time complexity .

because insertion sort has O(n) while quick sort has O(nlogn) in best case time complexity

19.b) counting sort is a linear sort

20 b) 17,5,13,3,2,4,12

21 c) O(n logn)

22.d) insertion sort best case run time always runs in fewer step than heap sort

.

Similar Solved Questions

1 answer
Write a two page essay explaining how Starbucks Financial Statements can help you enhance your understanding...
Write a two page essay explaining how Starbucks Financial Statements can help you enhance your understanding of accounting and how it enhance your ability to connect abstract financial accounting information to concrete observation. Write a two page essay explaining how Starbucks Financial Sta...
1 answer
From your evaluation, is operating cash flow positive and sufficient to cover capital expenditures? Please explain....
From your evaluation, is operating cash flow positive and sufficient to cover capital expenditures? Please explain. Consolidated Statements Of Cash Flows (Audited) (USD S) In Millions, unless otherwise specified 2014 2013 2012 2011 2010 Cash flows from operating activities Income from continuing ope...
1 answer
Question: An irreversible heat machine takes 100 kW of heat from a high temperature heat source...
Question: An irreversible heat machine takes 100 kW of heat from a high temperature heat source and throws 50 kW of heat into a low temperature heat well. All work output produced by the heat machine is transferred to a reversible heat pump. The heat pump operates between 17 °C heat source and 7...
1 answer
You have a portfolio that is invested 12 percent in Stock A, 54 percent in Stock...
You have a portfolio that is invested 12 percent in Stock A, 54 percent in Stock B, and 34 percent in Stock C. The betas of the stocks are 83, 1.38, and 1,67, respectively. What is the beta of the portfollo? o o o o o o n www ....
1 answer
Please write out work (not typed) -Thanks! 13.9 An 8 kg mass is attached to a...
please write out work (not typed) -Thanks! 13.9 An 8 kg mass is attached to a spring with a spring constant of 750 N/m. As the mass passes a position x, the speed is 2.75 m/s and the potential energy is 8.6 J. a) What is the amplitude? b) What is the maximum speed? c) What is the energy of the syste...
1 answer
Question 11 5 pts What is Project A's Payback with a WACC of 7.75%? YEAR CASH...
Question 11 5 pts What is Project A's Payback with a WACC of 7.75%? YEAR CASH FLOWS Project A Project B 0 -$1050 -$1050 675 360 650 N 360 3 360 4 360 HTML Editore BI VA - A - I E3311XXSE V CDTi 12pt Paragraph...
1 answer
Solve with details and explain each step please 1. (3 points) Prove that the metric defined...
solve with details and explain each step please 1. (3 points) Prove that the metric defined on Rudin's book, page 29 by | CP ( - ) d(x,y) = max 1 1+P:-y) is a metric, where each p, is a seminorm, and {c} is a sequence of positive numbers converges to 0 as i →...
1 answer
Indicate whether the pair of structures shown represent stereoisomers, constitutional isomers, different conformations of the same...
Indicate whether the pair of structures shown represent stereoisomers, constitutional isomers, different conformations of the same compound, or the same conformation of a compound viewed from a different perspective. Note that cis, trans isomers are an example of stereoisomers. H2CH3 CH2CH3 CH2CH3 ...
1 answer
Circle Circumfe Circle Diameter r is radius Finish A sprinter runs the curve of this 200...
Circle Circumfe Circle Diameter r is radius Finish A sprinter runs the curve of this 200 m in 10.34 s. Assume he ran in a lane which makes a semicircle (r 36.3 m) for the first part of the race. At 3.44 s into the race his speed is 4.0 m/s. At 8.0 s into the race his speed is 9.6 m/s. His speed afte...
1 answer
Discussion Board Unit 5 Discussion: Sampling Distributions Why are sampling distributions important to the study of...
Discussion Board Unit 5 Discussion: Sampling Distributions Why are sampling distributions important to the study of inferential statistics? In your answer, demonstrate your understanding by providing an example of a sampling distribution from an area such as business, sports, medicine, social scien...
1 answer
Asap help A 20 B 16 12 Bread D 8 4 E 0 1 2 3...
asap help A 20 B 16 12 Bread D 8 4 E 0 1 2 3 4 Tractors For question 9. refer to to PPF diagram above. Starting at point E. the production of successive units of bread will cost: a constant 8 units of tractors a constant 6 units of tractors 1/8, 1/6, 1/4, od 1/2 units of tractors 1/2.1/4, 1/6, a...
1 answer
A pension fund manager is considering three mutual funds. The first is a stock fund, the...
A pension fund manager is considering three mutual funds. The first is a stock fund, the second is a long-term government and corporate bond fund, and the third is a T-bill money market fund that yields a sure rate of 4.9%. The probability distributions of the risky funds are: Expected Return 10% St...
1 answer
A random sample of 17 brand energy bars of chocolate has, on average, 230 calories per...
A random sample of 17 brand energy bars of chocolate has, on average, 230 calories per bar. The standard deviation of the calorie content of this energy bar brand is 11.2 calories. Calculate the margin of error for a 98% confidence interval for the true average calorie content of this brand of choco...
1 answer
How do you divide #( 2i -7) / ( 3 i -2 )# in trigonometric form?
How do you divide #( 2i -7) / ( 3 i -2 )# in trigonometric form?...
1 answer
. gymnosperms, like the conifers, are characterized by having wind-dispersed pollen. how was this method of...
. gymnosperms, like the conifers, are characterized by having wind-dispersed pollen. how was this method of pollen dispersal an important evolutionary adaptation for these plants?   ...
1 answer
4. continued: 0) 1) Mg /anhydrous Eto Br 2bubble in dry CO, 1) NaCN/NaHSO (excess)/ Δ 1) NaCN/NaH...
Draw major product(s). please help!! 4. continued: 0) 1) Mg /anhydrous Eto Br 2bubble in dry CO, 1) NaCN/NaHSO (excess)/ Δ 1) NaCN/NaHSO 2) H2 (pressure) Raney Ni 人 (p) HO Ho A- s* Ho он Ho age score 4. continued: 0) 1) Mg /anhydrous Eto Br 2bubble in dry CO, 1) NaCN/Na...
1 answer
Quality Brick Company produces bricks in two processing departments—Molding and Firing. Information relating to the company’s...
Quality Brick Company produces bricks in two processing departments—Molding and Firing. Information relating to the company’s operations in March follows: Raw materials used in production: Molding Department, $26,800; and Firing Department, $4,400. Direct labor costs incurred: Molding D...
1 answer
1. Compare and contrast aging and disease. How do the effects of cigarette smoking on the...
1. Compare and contrast aging and disease. How do the effects of cigarette smoking on the body illustrate the difficulty of distinguishing aging from disease?...