在无序列表(例如100)中找到前N个(比如10个)元素的最佳解决方案是什么.
我头脑中的解决方案是1.使用快速排序对其进行排序,2.获得前10名.
但还有更好的选择吗?
java sorting algorithm
algorithm ×1
java ×1
sorting ×1