提交 c09b441b 编写于 作者: E Ed

A little modification on comment

上级 2ce19ed6
......@@ -185,11 +185,11 @@ class Solution:
# end的初始值即是sorted_list[0]的右端点
end = sorted_list[0][1]
# 从1开始往后找
# 从1开始往后找 因为0在上面已经取过了
for i in range(1,n):
# start是当前区间左端点值
start = sorted_list[i][0]
# 如果左端点比右端点都大了(可能相等)
# 如果当前左端点比最大右端点都大了(可能相等)
# 说明两区间不重叠 count+1 再更新end
if start>=end:
count += 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册