public static boolean DFSIterative(GraphNode n1, GraphNode n2) {
        if (n1 == null || n2 == null) return false;
        Stack<GraphNode> stack = new Stack<GraphNode>();
        stack.push(n1);
        while(!stack.isEmpty()) {
            GraphNode n = stack.pop();
            if (!n.isVisited) {
                n.isVisited = true;
                if (n == n2) return true;
                stack.addAll(n.adjacent);
            }
        }
        return false;
    }