Added tarjan sort and tests.