Mock Coding Interview: Meeting Rooms (Heap vs Sorting)

Pubblicato il: 28 febbraio 2019
sul canale di: 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


In questa pagina del sito puoi guardare il video online Mock Coding Interview: Meeting Rooms (Heap vs Sorting) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato abrar 28 febbraio 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,458 volte e gli è piaciuto 15 spettatori. Buona visione!