There is group of nodes. There are three type of nodes:leader node .follower node - connected to one or more leader directly or indirectly.vagrant node - no connected to any leader directly or indirectly.We can dynamically connect any node to any other node .link(node1, node2)unlink(node1, node2)After random link and unlink operationslistNotConnected() should return list of vagrant node or unconnected nodes .How to find list of nodes which are not connected to leader ? How to find it in real time ?
How to find online nodes in real-time in graph?
graphs