It is the algorithm to find the overlap in two intervals. And I like to learn from the peer how he solved the problem first time with the correct algorithm, and also very good skills to write Java code.
The peer has very good working experience to work on biggest software companies in the world, China and USA. I had good understanding the programmer who worked for Tencent, Amazon and Microsoft, compared to my first practice, he is much better and also strong in the analysis of the algorithm.
The algorithm is challenging and very time consuming even for the top talent programmer in the world first time.
Mock interview is fun and I watched a few times through the video, how the peer got family support and work on the mock interview very hard, since his wife passed by behind in the living room. So I talked to the peer that relax, let me play with my medicine ball, take your time to come out the correct algorithm.
The peer was very busy to come out the overlap calculation, and also go through the discussion of advancing the pointer of one slots.
Here is Java code I reviewed. I also like to point out the analysis is perfect. I like to use it as my reference to come out the analysis.