how to efficiently get the k bigger elements of a list in python

后端 未结 5 633
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 06:58

What´s the most efficient, elegant and pythonic way of solving this problem?

Given a list (or set or whatever) of n elements, we want to get the k biggest ones. ( Yo

5条回答
提交回复
热议问题