You are given a list of trace logs from a single-threaded program. Each line is either an enter event of the form "> name" or an exit event of the form "< name", where name is a function name.
Return the name of the function that was called the most times. A call is counted on every enter event; exit events are ignored.
If two or more functions are tied for the maximum number of calls, return the one whose first enter event appears earliest in the log.
You may assume there are no recursive calls (no function appears twice on the active stack), every exit matches the most recent enter, and the input is well-formed. If no function is ever entered, return the empty string.
main is called 1 time; a and b are each called 2 times. a and b tie, but a's first enter event (> a) appears before b's first enter event (> b), so a wins the tie-break.
Each log entry is "> name" or "< name", where name matches [A-Za-z_][A-Za-z0-9_]*.