Question: Topological order: Write a java function topoSort() that returns a list of all the elements in P, a Poset, in an ordered sequence that is
Topological order:
Write a java function topoSort() that returns a list of all the elements in P, a Poset, in an ordered sequence that is consistent with the partial order.

Returns a topological sort of this poset. * @return a list containing all of the elements in the set in ascending order (if x s y according to the partial * order, then the index of x should be less than the index of y in the returned list) public List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
