GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LeetCode/Greedy/1288.Remove-Covered-Intervals at master · wisdompeak/LeetCode

Expand file tree

/

1288.Remove-Covered-Intervals

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

1288.Remove-Covered-Intervals

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
1288.Remove-Covered-Intervals.cpp
1288.Remove-Covered-Intervals.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

1288.Remove-Covered-Intervals

将所有的区间按照左端点排序,如果左端点相同的话,优先处理大区间。

我们顺序处理某个区间i,假设为[a,b]:后面的区间j的左端点一定都比a晚,如果j的右端点也比b早的话,那么j一定就是被包含在i里面的。我们可能会遇到若干个这样的j,但区间j会越来越靠右。直至发现j的右端点比b晚,说明j已经跑出了i的覆盖范围,那么我们就把j当作i,重复之前的操作。

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.