In which version of JDK7, MergeSort was replaced with TimSort in Collections.sort method?

你说的曾经没有我的故事 提交于 2019-12-12 04:47:18

问题


I searched and couldn't find in which version the TimSort actually replaced the MergeSort in collections.sort() method. If anyone can let me know the exact version for JDK7 it would be a great help.


回答1:


TimSort has been used in Java 7 right from the release. To be more specific, it has been added in Java 7, beta 70.

It might be worth noting that this is still a modified merge sort, just having more modifications being more efficient than the modified merge sort that has been used in previous version.



来源:https://stackoverflow.com/questions/47084824/in-which-version-of-jdk7-mergesort-was-replaced-with-timsort-in-collections-sor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!