public static void main(String args[]){
        Graph<Integer> graph = new Graph<Integer>(false);
        graph.addEdge(0, 1);
        graph.addEdge(0, 2);
        graph.addEdge(1, 2);
        graph.addEdge(2, 3);
        graph.addEdge(1, 3);
        graph.addEdge(3, 4);
        graph.addEdge(0, 4);
        graph.addEdge(0,3);
        NumberofTriangles not = new NumberofTriangles();
        System.out.println(not.countTriangles(graph));
    }
http://www.careercup.com/question?id=5988741646647296
Given an undirected graph find number of triangles in this graph
Find cycle of length 3. Pass parent in DFS search.
If there is a cycle check if my parent is neighbor of the the node 
which caused it to be a cycle.
src/com/interview/graph/NumberofTriangles.java