Question: 2. Djikstras Mesh Problem: Generate a class node that contains an integer id, a position (x, y) and a vector of 0

2. Djikstras Mesh Problem: Generate a class node that contains an integer id, a position (x, y) and a vector of 0 <= n <= 5 node pointers (called the connectivity of the node). These node pointers will point at other nodes in the collection. Accepting a user input of x > 5, generate a set of x nodes each with random connectivity n. Implement an algorithm to search for a path from nodes Ai to Aj where i and j are provided as user input and represent node id values. The solution should list each of the nodes, who they point at and then a sequence of node ids beginning with i and terminating with j. If no such path exists then that should be noted. in C++

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!