Fixed sort algorithm