topsort inputs n and the partial order and places the solution in topologicalsort

topsort(&n,topologicalsort);