Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
I've noticed in the previous problems, we calculate the minimum of the overlaps ...

Alan Lo

Jun 26, 2022

I've noticed in the previous problems, we calculate the minimum of the overlaps start time and maximum of end times, but in this question we are doing the reverse. Is there some keywords/hints from reading the problem on how to know which method to use? Thanks

0

0

Comments
Comments
Design Gurus
Design Gurus3 years ago

The previous problem is expanding the interareal as we insert a new interval and merge it with existing intervals.

This problem is shrinking the intervals to find the intersecting part between intervals.

So whenever we have to expand, we need to take the smallest star...

edisonfreire14
edisonfreire14 6 months ago

You need to have a clear understanding of the concept of intersections.

On this page