Question: Question 6: You are given a sequence S consisting of n numbers; not all of these numbers need to be distinct. Describe an algorithm, in

Question 6: You are given a sequence S consisting of n numbers; not all of these numbers need to be distinct. Describe an algorithm, in plain English, that decides, in O(n) time, whether or not this sequence S contains a number that occurs more than n/4 times. You may use any result that was proven in class. Justify the correctness of your algorithm and explain why the running time is O(n). Hint: The algorithm must be comparison-based; you are not allowed to use hashing, bucketsort, or radix-sort
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
