Question: You are required to implement graph through adjacency list. User should read data from files having node(node.txt) and edge information(edges.txt). On the basis of information

  1. You are required to implement graph through adjacency list. User should read data from files having node(node.txt) and edge information(edges.txt). On the basis of information from files, graph should be implemented. User should be given following options:
    1. Add new node.
    2. Add new edge
    3. Delete existing node
    4. Delete existing edge
    5. Find total number of edges
    6. Search a path between two nodes
      1. Depth first traversal.
      2. Breath first traversal.

file 1( edge.txt)

a,b a,e a,h b,d b,a b,f d,c c,e c,a c,d c,g c,h f,g f,h g,h g,a g,d

file 2 (nodes.txt)

a b d c f g h

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!