剑指offer-29-最小的K个数(python) 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4.比直接sort函数要快,时间复杂度O(kn)请大佬指教 # -*- coding:utf-8 -*- class Solution: def GetLeastNumbers_Solution(self, tinput, k): res = [] for i in range(k): min_r = tinput[0] pointer_k ...