CS301 Data Structures Assignment 7 Solution Fall 2012


Assignment Statement:                                              Marks: 20


Consider the following 11 nodes:

Apply union operation on the above nodes in such a way that: 

  1. Node ‘E’ and node ‘F’ are connected to node ‘B’.
  2. Nodes ‘H’ and ‘G’ are connected to node ‘E’, whereas node ‘k’ has a connection to node ‘F’.
  3. Node ‘L’, ‘M’, and ‘N’ provides a connection to Node ‘K’.
  4. Node ‘O’ has a connection to node ‘G’ and node ‘P’ has a connection to node ‘M’.


Solution Guidelines:

1. Perform Union operation on these nodes in such a way that at the end of all union operations, there is a forest showing all connections to node ‘B’.

  1. You have to perform single union operation at one time.
  2. You are required to show the union operations performed at each step.

Download Complete solution here:  CS301-Solution.doc CS301-Solution.doc