public void readFileIntoMemory(String fileName, int lineNum)
			throws IOException {
		File file = new File(fileName);
		BufferedReader br = new BufferedReader(new FileReader(file));
		String line = br.readLine();
		int headVertex = 0;
		int tailVertex = 0;
		// int lineNo =0;

		while (line != null) {
			// lineNo++;
			String[] vertexRow = line.split(" ");
			headVertex = Integer.parseInt(vertexRow[0]);
			tailVertex = Integer.parseInt(vertexRow[1]);

			// set the bit in originalGraph for index headVertex
			// initialize originalGraph and nodesFinishtime;
			LinkedList<Integer> tmp = originalGraph.get(headVertex - 1);
			tmp.add(tailVertex - 1);

			// set the bit in reversedGraph for index tailVertex
			LinkedList<Integer> tmp2 = reversedGraph.get(tailVertex - 1);
			tmp2.add(headVertex - 1);

			line = br.readLine();
		}
		br.close();
	}