4 ms·
One time I needed to sort some data arbitrarily — the resulting order did not matter, it only mattered that it was the same for the same data in different order
by thekiptxt 4y ago
One time I needed to sort some data arbitrarily — the resulting order did not matter, it only mattered that it was the same for the same data in different orders.
My senior engineer advised me against using Java .sort() because “we didn’t write it so we couldn’t be sure it would do the same thing every time.”
- Banana699 4y agoTo play the fun game of charitability, that engineer could have been talking about sort stability. Which could technically violate the property you want. A quick search however does say that Java's .sort() is stable.