Simple Python Solution using list


#1

def solve(self,A,B):
l1=[]
A.sort(reverse=True)
for i in range(B):
l1.append(A[i])
return l1