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:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e nĂŁo consigo tira-la no chorme
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