public static void main(String argsp[]){
        Graph<Integer> graph = new Graph<Integer>(false);
        graph.addEdge(1, 2);
        graph.addEdge(2, 5);
        graph.addEdge(1, 3);
        graph.addEdge(3, 4);
        graph.addEdge(4, 6);
        graph.addEdge(5, 6);
        graph.addEdge(7, 9);
        graph.addEdge(7, 8);
        BiparteGraph bi = new BiparteGraph();
        boolean result = bi.isBiparteDFS(graph);
        System.out.print(result);
    }
http://www.geeksforgeeks.org/bipartite-graph/
 Includes both DFS and BFS method
src/com/interview/graph/BiparteGraph.java