Each room is a vertex, and each key in a room creates a directed edge to another room. Room has keys [1, 3] means edges and .
You start in room , so that is your source vertex. Run DFS to see which rooms you can reach. If you visit all rooms, return true.
This translation makes the problem trivial. It is a standard "can I reach all vertices from the source?" question.