Pri traditional sorting algorithm