# -*- coding:utf-8 -*-
class Solution:
def GetLeastNumbers_Solution(self, tinput, k):
# write code here
if not tinput or k>len(tinput):
return []
a=sorted(tinput)
return a[0:k]
剑指offer-最小的K个数(python)
猜你喜欢
转载自blog.csdn.net/qq_42738654/article/details/104287054
今日推荐
周排行