News for hackers. Stuff that matters.
Re:On the Worst-Case Complexity of TimSort by sdinsn on Friday August 31, 2018 @06:16PM (#17888927)
You are incorrect. Look at the error message more closely:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 49
        at java.util.ComparableTimSort.pushRun(Unknown Source)
        at java.util.ComparableTimSort.sort(Unknown Source)
        at java.util.Arrays.sort(Unknown Source)
        at Test.main(Test.java:80)
The error occurs inside TimSort, not at

    arrayToSort[sum] = 1;
It's a bug with TimSort going out of bounds (which obviously shouldn't happen ever), not the Test.

There are no comments on this comment yet.