TimSort is a stable hybrid sorting algorithm derived from merge sort and insertion sort that exploits existing ordered runs. Since OpenJDK 7, it may detect comparator contract violations and fail with an IllegalArgumentException rather than merely producing an incorrectly ordered result. section 7.11
Overflowing comparator
A comparator such as `return account1.hashCode() - account2.hashCode();` can overflow because hash codes may have any int value. Replace subtraction with `Integer.compare(account1.hashCode(), account2.hashCode())`. With 32 randomly generated values and seed 209, sorting can throw `Comparison method violates its general contract!`; smaller collections may not expose the defect because arrays under 32 elements use a simpler path. section 7.11
Avoid TimSort failures and comparator-dependent collection corruption:
- Test comparator behavior with large positive and negative values, and with collection sizes beyond minimal examples. section 7.11

