gpt4 book ai didi

sorting - jdk 中的快速排序或 O(N.logN) 排序

转载 作者:搜寻专家 更新时间:2023-11-01 03:08:11 24 4
gpt4 key购买 nike

<分区>

是否有快速排序,或另一种 O(N.logN) 排序,在 jdk 标准库中可用?

Collections 类没有带来希望:

Implementors should feel free to substitute other algorithms, so long as the specification itself is adhered to. (For example, the algorithm used by sort does not have to be a mergesort, but it does have to be stable.)

Collections.sort() 没有给出任何线索:

sort(List<T> list) Sorts the specified list into ascending order,according to the natural ordering of its elements.

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com