Mock Coding Interview: Meeting Rooms (Heap vs Sorting)

Published: 28 February 2019
on channel: 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


On this page of the site you can watch the video online Mock Coding Interview: Meeting Rooms (Heap vs Sorting) with a duration of hours minute second in good quality, which was uploaded by the user abrar 28 February 2019, share the link with friends and acquaintances, this video has already been watched 2,458 times on youtube and it was liked by 15 viewers. Enjoy your viewing!