class GraphSearch {

	public void searchDFS(GraphNode<T> root) {
		if (root == null) {
			return;
		}

		// visited root
		if (searchPathDFS.length() > 0) {
			searchPathDFS.append("->");
		}
		searchPathDFS.append(root.data.toString());
		root.visited = true;

		for (GraphNode<T> node : root.neighborList) {
			if (!node.visited) {
				searchDFS(node);
			}
		}
	}

}