% QuickSort for a student structure
function out = quickSort(values)

if (length(values) <= 1)
    out = values;
else
    midValue = values(floor(length(values)/2));
    low = values(values < midValue);
    high = values(values > midValue);
    mid = values(values == midValue);
    
    low = quickSort(low);
    high = quickSort(high);
    out = [low mid high];
end
