Count with a dict, then pick the top
Three short moves turn up in most interview answers: counting, grouping and sorting with a key. Each is a few lines once you've written it a couple of times.
Counting is one line in a loop. counts.get(ch, 0) is the count so far, 0 for a letter not seen yet:
counts = {}
for ch in "baba":
counts[ch] = counts.get(ch, 0) + 1
print(counts)
print(max(counts, key=counts.get))
print(min(counts, key=lambda ch: (-counts[ch], ch)))
{'b': 2, 'a': 2}
b
a
max(counts, key=counts.get) picks the letter with the highest count, and on a tie it keeps the first one it met, b. When a question says how to break a tie, put the rule in the key. lambda ch: (-counts[ch], ch) is a small function written in place: it takes a letter and gives back a pair, the letter's count made negative and the letter itself. min picks the smallest pair. The minus sign makes the highest count the smallest, and on a tie the letter decides, so the tie goes to a. collections.Counter counts in one call too, and it's worth knowing, but the dict version is the one you can always write.
In the editor, write most_ordered(orders): count the orders, then pick the top one, with ties going to the alphabet.