class Solution:
def findMin(self, nums: List[int]) -> int:
return min(nums)
뭐지,,,,,, 파이썬,,,,, 이거 맞나......
from heapq import heappop, heappush
class Solution:
def findMin(self, nums: List[int]) -> int:
heap = []
for n in nums:
heappush(heap, n)
return heappop(heap)
오히려 더 느린뎅...