Remove reverseSort function to core.
Add graph tests.