Checked in legacy sorting algorithms