摘要: class Solution: def findKthLargest(self, nums: List[int], k: int) -> int: """堆排序思想""" def heapify(array, start, end): while True: max_pos = start #初始化 阅读全文
posted @ 2020-09-27 19:01 程序猿-悟空 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 栈 class Stack: def __init__(self, limit: int 10): self.stack = [] self.limit = limit def __bool__(self): return bool (self.stack) def __str__(self): r 阅读全文
posted @ 2020-09-27 18:12 程序猿-悟空 阅读(380) 评论(0) 推荐(0) 编辑