Company: thoughtworks_9oct
Difficulty: medium
Class Performance Assessment Problem Description We've been asked to build the world's first fully-automated classroom. We're working on the software to determine how well each class has performed. The class uses a novel system where the success of an individual is assigned to a symbol. These symbols have the following precedence: A > B > C > D > E > F The symbols are collected and fed into the assessment robot. The success of the class is determined by the following rules: The robot counts the occurrences of each symbol. The symbol with the highest frequency is chosen as the class's overall score. If multiple symbols have the same highest frequency, the assessment robot observes the precedence and chooses the symbol with the highest precedence among them. Write a function for the assessment robot. Given the scores of the class as a string of symbols, it should output the class's overall score. Examples Example 1: Input: symbols = "AAABBCCDDEFF" Output: "A" Explanation: The counts of s