Quick-sort assignment