package edu.java.chap4; import java.util.LinkedList; //given a directed graph, design an algorithm to find out whether there is a route between two nodes. /* */ public class DirectPath { //public static void DFS(Node root){ //} public static boolean CheckReach(int from, int to, int[][] vertice){ if(from == to) return true; LinkedList list = new LinkedList (); list.add(from); int pos = 0; while(list.size()>pos){ from = list.get(pos); for(int i = 0; i list, int data){ for(int i = 0; i