Hard questions are rarely about obscure tricks. They test whether you can pick the right data structure and keep the details straight: ties, empty input, invalid input that must raise an error, and state that changes as you go.
Talk through the approach before coding: what you store, how you update it, and what you return. Write small helper functions if it makes the main loop clearer. Then test the edge cases out loud.
Allow about fifteen minutes each. The tools you need are all from this course: OrderedDict or a plain dict for an LRU cache, defaultdict for nested totals, regular expressions for parsing, and a queue or recursion for ordering tasks.