subject

For each problem below, do not write pseudocode. Explain with words why your algorithm is correct and analyse its running time. Problem 1 (rating restaurants) You are writing a blog about restaurants in various cities. You have a list of the 16 top restaurants in La Habana but you don't trust the reviewer. You have a friend in there who is willing to help and all you want to do is provide the best of these 16 restaurants and the worst of these 16 restaurants. So you ask your friend to compare restaurants and give you her opinion on the best and the worst. (a) Briefly explain how your friend can help you doing 30 comparisons.
(b) Design an algorithm your friend can apply to help you if the list has n 2k many restaurants.
Your input is a list of n restaurants and your friend can compare any two in O(1) time. You want to output the best and the worst. Explain why your algorithm is correct and state and analyse its running time. Fastest (and correct) solutions worth more credit.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
You know the right answer?
For each problem below, do not write pseudocode. Explain with words why your algorithm is correct an...
Questions
question
Mathematics, 13.04.2021 19:40
question
Mathematics, 13.04.2021 19:40
question
Mathematics, 13.04.2021 19:40
question
Mathematics, 13.04.2021 19:40
question
Mathematics, 13.04.2021 19:40
question
Mathematics, 13.04.2021 19:40
question
World Languages, 13.04.2021 19:40
Questions on the website: 13722360