A - Find the Missing Letter Editorial
by
sjhi00
Solution 1: If the given string is CSC or SCC, then the answer is S. If the given string is SSC or SCS, the answer is C. Other strings cannot be given as input. It is possible to use a conditional statement to solve this problem.
Solution 2: In the string SCSC, the letter S and C appears twice. If we delete exactly one letter, one of the letter S and C appears twice, and the other appears only once. We can count the number of the letter S and C from the given string, and print the letter which appears only once.
Solution 3: It is okay to print the character corresponding to the value of bitwise XOR of all ASCII code of each character in the given string.
posted:
last update:
