Mock Coding Interview: Meeting Rooms (Heap vs Sorting)

Publicado em: 28 Fevereiro 2019
no canal de: abrar
2,458
15

Watch a full mock coding interview where the interviewee tackles Meeting Rooms II, one of the most popular interval scheduling problems in coding interviews. This problem asks you to find the minimum number of conference rooms required given a set of overlapping meeting time intervals.

The interview covers the full problem-solving arc from understanding the problem, working through examples on a number line, and arriving at two different solution approaches. You'll see a detailed walkthrough of the sorting-based approach, where start and end times are separated and processed individually to track room count, as well as a conceptual breakdown of the min-heap approach where rooms are allocated based on the earliest ending meeting. The interviewee codes the sorting solution in Java, building a custom Meeting class and using a comparator-based sort.

0:00 Introduction and background
0:25 Problem statement: Meeting Rooms II
1:27 Working through examples and understanding overlap
2:50 Exploring a heap-based approach
5:14 Key insight: separating start and end times
7:22 Number line visualization
9:08 Tracking room count with increment and decrement
12:05 Extended example with additional meetings
15:56 Discussing the min-heap alternative approach
16:05 Time complexity analysis: O(n log n)
18:57 Coding the solution in Java
24:06 Code review and discussion


Nesta página do site você pode assistir ao vídeo on-line Mock Coding Interview: Meeting Rooms (Heap vs Sorting) duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário abrar 28 Fevereiro 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,458 vezes e gostou 15 espectadores. Boa visualização!