These problems use fresh networks, boards, and operational questions. Choose the state and traversal before writing the function. The shape of the input alone doesn't decide the algorithm: a directed call map can ask about mutual reachability, universal termination, or the number of valid deployment orders. Each question needs a different invariant.
Work through one small case by hand and include a case that would break your first idea. Parallel cables need edge identifiers, deletion histories can be processed backward, and a complete floor inspection can't stop at the first route to the exit. When a count is requested, decide which objects are distinct before adding ways. After coding, explain the time and space cost using the limits in that problem. You can run the examples as often as you need.