Question: Q1) A. Implement some representation of directed graphs. You are advised to use adjacency list representation. Use the following structures to represent your nodes and

Q1) A. Implement some representation of directed graphs. You are advised to use adjacency list representation. Use the following structures to represent your nodes and edges.

 Q1) A. Implement some representation of directed graphs. You are advised

B. Implement the possibility of doing a BFS traversal of your graph, starting at a user-specified vertex. The program should print (to standard out) the order in which the vertices are discovered. (Note: you must reuse the code of Queue ADT you implemented in Labs) C. Implement the possibility of doing a DFS traversal of your graph, starting at a user-specified vertex. The program should print (to standard out) the order in which the vertices are discovered. (Note: you must reuse the code of Stack ADT you implemented in Labs) D. Write a MENU driven program which asks user to perform following tasks. 1. Insert a Vertex 2. Insert an Edge 3. Delete a Vertex 4. Delete an Edge 5. Graph traversal using BFS (further asks user for starting vertex) 6. Graph traversal using DFS (further asks user for starting vertex) 7. Find degree of a node 8. Exit

NOTE: For this question, you are to implement a simple representation of a graph in C++ and the possibility to search the graph.

struct Gedge{ int number; Gedge *ptr; } struct Gnode int Data; Gnode *vptr; Gedge *head; }

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!