Reputation: 109
I've a graph like " A-->B-->C " now i removed vertex "B". Now my graph contains vertices A and C and no edges, here C is the leaf node it doesn't linked with any other nodes. Now my doubt is what is advantage of leaf nodes when they doesn't contain relation ship with any other nodes.(It is memory wastage right..?)
Upvotes: 0
Views: 159
Reputation: 11006
It depends on whether you plan to link back up with C node. If C cannot ever possibly be used again in your use case, then yes, C is a waste of resources.
It depends on your Graph's purpose.
Upvotes: 2