Find Time Ranges When At Least K TurboTax Experts Are Free

Last updated: November 29, 2026

Quick Overview

Each TurboTax Live expert publishes availability as half-open minute ranges. Return the merged list of time ranges during which at least k experts are simultaneously available, so the scheduler knows when it can offer a guaranteed callback.

Intuit
Coding & Algorithms
Software Engineer
Intuit
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Medium

0

0

0 solved


Each TurboTax Live expert publishes availability as half-open minute ranges. Return the merged list of time ranges during which at least k experts are simultaneously available, so the scheduler knows when it can offer a guaranteed callback.

TurboTax Live connects filers with CPAs and enrolled agents, and capacity during the April peak is a real constraint, so interval questions framed around expert scheduling fit Intuit's onsite coding round. The interviewer is looking for a clean sweep line, correct handling of touching intervals, and merging adjacent output ranges.

What the Interviewer Expects
  • Choose a sweep line over events rather than checking every minute
  • Handle half-open intervals so an end and a start at the same minute do not create a false gap or false overlap
  • Detect crossings of the threshold k in both directions
  • Merge adjacent output ranges
  • State complexity and how it scales with the number of experts
Key Topics to Cover
intervals
sweep line
event sorting
half-open ranges
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you also return which experts are free in each range?
  • How would you answer many queries of the form 'are k experts free at time t' quickly?
  • How would you handle experts in different time zones and daylight saving changes?
  • What if each expert's own ranges overlap and are not pre-merged?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: a flat list of (start, end) ranges in minutes, where each expert's own ranges are already merged (so one expert contributes at most 1 to the count at any instant). Output: sorted, non-overlap...

High-Level Design

Turn every range into two events: (start, +1) and (end, -1). Sort events; for equal times, -1 sorts before +1 because the tuple sort puts -1 first, which is exactly right for half-open ranges....


Submit Your Answer
Markdown supported