Your question is One-Pass Character Difference. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
BAE Systems USA mission-system software receives two character sequences representing the same telemetry symbols, except the second sequence contains one additional character. The characters may appear in any order and may repeat.
Given arrays first and second, where second contains every character from first plus exactly one additional occurrence, return the extra character. Your solution must use exactly one explicit iteration, must not sort either array, and must use O(1) additional space.
first with length n and second with length n + 1.second.ord() to convert a character to its integer code point.def find_extra_character(first, second):