employee_free_time

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2019 License: MIT Imports: 0 Imported by: 0

README

< Previous                  Next >

759. Employee Free Time (Hard)

[Heap] [Greedy]

Similar Questions

  1. Merge Intervals (Medium)
  2. Interval List Intersections (Medium)

Hints

Hint 1 Take all the intervals and do an "events" (or "line sweep") approach - an event of (x, OPEN) increases the number of active intervals, while (x, CLOSE) decreases it.

Processing in sorted order from left to right, if the number of active intervals is zero, then you crossed a region of common free time.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL