public static List<String> topologicalSort(Graph graph)
	{
		if(!graph.getDirected())
			throw new UnsupportedOperationException("Graph is undirected");

		int counter = 0;//To determine whether the graph is cyclic
		LinkedList<Vertex> queue = new LinkedList<Vertex>();
		LinkedList<Vertex> vertices = new LinkedList<Vertex>();
		List<String> result = new LinkedList<String>(); //ASK A TA ABOUT RETURNING A LIST VS ARRAYLIST VS LINKEDLIST TODO
		vertices = (LinkedList<Vertex>) graph.listVertices();//Get a list of every vertex
		for(Vertex v : vertices)
			if(v.getInDegree() == 0)//Enqueue every vertex with an in degree of zero
				queue.addFirst(v);


		//Main process
		while(!queue.isEmpty()){
			Vertex v = queue.poll();
			result.add(v.getName());//Add the vertex to the result
			counter++;//Checks for cycles

			for(Edge e : v.getEdges()){
				e.getOtherVertex().decInDegree();
				if(e.getOtherVertex().getInDegree() == 0){
					queue.add(e.getOtherVertex());
				}
			}
		}

		if(counter != graph.getVertices().size())
			throw new UnsupportedOperationException("This graph contains a cycle");

		return result;
	}