Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Oct 3, 2018
1 parent 3779d4c commit 1987b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Segment_Tree/218.The-Skyline-Problem/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

所以每次查看一个edges,我们都要比较当前的高度(用cur记录)和Set里的最大值进行比较:一旦不同,就用Set里的最大值去加入results,同时也要更新cur。

有一个细节需要注意,在生成edges数组时,如果某一个位置同时有上升沿也有下降沿,如意要先考察上升沿,再考察下降沿。也就是要先加入一个下降沿,再退出可能的下降沿。否则类似[[0,2,3],[2,5,3]]的测试例子就会有问题。
有一个细节需要注意,在生成edges数组时,如果某一个位置同时有上升沿也有下降沿,注意要先考察上升沿,再考察下降沿。也就是要先加入一个上升沿,再退出可能的下降沿。否则类似[[0,2,3],[2,5,3]]的测试例子就会有问题。

#### 解法2:线段树

Expand Down

0 comments on commit 1987b5e

Please sign in to comment.