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/Others/732.My-Calendar-III at master · wisdompeak/LeetCode

Expand file tree

/

732.My-Calendar-III

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

732.My-Calendar-III

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
732.My-Calendar-III.cpp
732.My-Calendar-III.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

732.My-Calendar-III

本题和253一模一样。典型的扫描线算法。

我们用一个按key有序的Map。每次调用book函数时,我们就操作Map[start]+=1和Map[end]-=1。然后遍历这个Map的key,按照时间轴的顺序累加差分值,即遇到1就加一,遇到-1就减一。这样就得到每个时刻有多少并行的会议。最终输出其中的最大值。

Leetcode Link

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.