Improved verification of sorting results