Find the Earliest Meeting Slot for Consultants Across Calendars
Last updated: November 29, 2026
Quick Overview
Given each consultant's busy intervals for a day, a required headcount k and a meeting duration, return the earliest start time at which at least k of the same consultants are all free for the entire duration, or None.
Accenture
November 29, 20260
0
0 solved
Given each consultant's busy intervals for a day, a required headcount k and a meeting duration, return the earliest start time at which at least k of the same consultants are all free for the entire duration, or None.
Accenture staffs engagements with distributed teams and constantly schedules client workshops, so calendar intersection is a natural screen problem. The interviewer watches for the trap that a simple count of free people over time is not enough, because the same k people must be free throughout.
What the Interviewer Expects
- Converts busy lists into free intervals within working hours
- Recognizes that headcount sweeps can mix different people across the window
- Justifies why only free-interval start times need to be tested
- Gives a correct and analyzable algorithm
- Handles overlapping and unsorted busy intervals
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you speed this up for 500 consultants and thousands of intervals?
- How would you return which consultants to invite?
- How would you handle consultants in different time zones with different working hours?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Times are numbers within [day_start, day_end]. Busy intervals may overlap and be unsorted. We need some set of at least k people who are each continuously free over [t, t + duration]. Return the s...
High-Level Design
First, per person, sort and merge busy intervals into free intervals. A tempting approach is a sweep that counts how many people are free at each instant, but that is wrong: with A free 9 to 11, B fre...