fast function

Factorial Approach for Sorting Task data