It is dependent on the algorithm, but the default Julia sort algorithm is stable, which means that equal keys will be in the same order after sort as before. You can supply a function to sort that gives the relative order of two elements. See the lt keyword argument.
3 Likes