generate a class node that contains an integer id


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 display 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. Extra credit will be awarded if the MINIMAL path is always reported.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: generate a class node that contains an integer id
Reference No:- TGS0210126

Expected delivery within 24 Hours