Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Monday, March 28, 2011

Don't trust Wiki blindly

Sometimes Wiki contains inconsistencies even for basic computer science articles. Wiki page for merge sort states that Java SE 7 uses merge sort as a default implementation for Arrays.sort() method. However that's not true.


Oracle Java SE 7 documentation for Arrays.sort() clearly states that the default implementation is based on tuned Double-Pivot version of Quicksort.

This is important if some applications depend on stable sorting algorithms.
Merge sort is stable, quicksort is not (in most implementations).