Sunday, December 24, 2017

Interval overlap?

Dec. 24, 2017

Introduction


I had a mock interview 10:00 PM to work on the algorithm related to interval. And then I had chance to practice the algorithm in 30 minutes. I explained the algorithm by some drawing first and then write the algorithm.

Dec. 23, 2017 practice is 30 minutes long. Here is C# practice. The code could not pass edge case to return empty case, need to figure out later.

Interval overlap


There are more than one way to define the interval overlap. To choose minimum value of two start values and then maximum value of two end values, and also check the max value is bigger than the minimum value.

Interval algorithm 


It is time for me to review my practice on interval related algorithms last few years.



No comments:

Post a Comment