wuyijia

导航

代码随想录算法训练营-贪心算法-5|56. 合并区间、738. 单调递增的数字、968. 监控二叉树

56. 合并区间 时间复杂度: O(nlogn) 空间复杂度: O(logn),排序需要的空间开销 1 class Solution: 2 def merge(self, intervals): 3 result = [] 4 if len(intervals) == 0: 5 return res

posted on 2023-09-21 13:39  小吴要努力  阅读(3)  评论(0编辑  收藏  举报