 math sort algorithm 23 