Sort algorithms from LF8.