📅  最后修改于: 2022-03-11 14:46:07.624000             🧑  作者: Mango
import heapq
import random
sample = [random.randint(0, 1000) for _ in range(100)]
print(min(sample)) # O(N)
heapq.heapify(sample) # O(N)
print(sample[0]) # O(1)