Medium questions combine two ideas: sort and then sweep, a dictionary plus a linked list, counting plus ordering. The interviewer watches how you choose data structures and whether you can say what each operation costs. Expect a follow-up on every one: "what if the input is huge", "can you make get and put O(1)", "what about invalid input".
Work the way you would in the room: say what the input looks like, pick the edge cases first (empty input, one item, duplicates, large values), state the time and space your solution needs, then code. Each problem has hidden tests on exactly those edge cases.