In Java code,
Create a new class called IntuitiveTopological that implementsthe TopologicalSort interface.Use BetterDiGraph to store thegraph.
Instead of using DFS to find a topological sort, implement thefollowing algorithm: “IntuitiveTopological”. This algorithm worksas follows: look at
your graph, pick out a node with in-degree zero, add it to thetopological ordering, and remove it from the graph. This processrepeats until the graph is empty.
//TopologicalSort class
/**
* Interface for classes providing a topological sort of adigraph.
*
* @author Sedgewick and Wayne, Acuna
*/
public interface TopologicalSort
{
/**
* Returns an iterable object containing atopological sort.
* @return a topological sort.
*/
public Iterable<Integer> order();
/**
* Returns true if
PayPal Gateway not configured
PayPal Gateway not configured