Assuming this is `Array.sort`, the algorithm used is not defined, and is not necessarily stable.