Problem
Consider again the input A[1, . . . , n] from the above question. Describe an O(n) algorithm that outputs the most popular name. (i.e.: the name that was chosen by the most students). Your solution must briefly describe the idea of your algorithm, and provide the pseudo-code. Explain why the runtime is O(n). (*you do not need to explicitly derive T(n), just explain why the algorithm is O(n)).