You are given a graph represented as an adjacency list, where each key is a node and its corresponding value is a list of neighboring nodes. Implement a function to check if all nodes in the graph are connected and return 'Connected' if they are, otherwise return 'Not Connected'. The input graph is represented as a dictionary where each key is a node and its corresponding value is a list of neighboring nodes.
Explanation: The graph has three nodes and they are all connected to each other.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak