I need to select a random destination node from a weighted Graph. The weight is the distance from source to the node. The source is fixed. The source cannot be the destination. The code needs to run in such a way that after every 5 seconds it picks up a random node from the graph and prints the distance of it in respect to the source. The code needs to be done in java and run for at least 6 nodes. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire