import heapq
class Solution:
# @param A : list of integers
# @param B : integer
# @return a list of integers
def solve(self, A, B):
heapq.heapify(A)
return heapq.nlargest(B,A)
[Python 3]K-Largest Element. 2-liner
tilak-singh
#1