Program 4
Program 4
Develop a program to find the shortest path between vertices using the
bellman-ford and Path vector routing algorithm
import java.util.*; // Import the Java utility package for Scanner and Arrays
switch (choice) {
case 1: // Construct the routing table for a specific node
System.out.println("Enter the node for which routing table
should be constructed:");
int id = in.nextInt();
id--; // Adjust for 0-based indexing