FastPrepEarliest Common Meeting Start
Problems/Earliest Common Meeting Start

Earliest Common Meeting Start

Visa logoVisa● MediumFULLTIMEOA

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The interview report supplies person, activity, start-time, and end-time strings plus a requested duration, and asks for the earliest common start in HH:MM form or -1. Inclusive busy endpoints and the one-day boundary are disclosed practice assumptions that reproduce the visible examples. Approximate source match: 90%.

Each row of busy is [person, activity, start, end], where the times use 24-hour HH:MM format. A row makes its person unavailable at every minute from start through end, inclusive.

Return the earliest time at which all listed people can attend for duration consecutive minute slots within the same day. When at least one busy row is present, search begins at the earliest listed start time; an empty calendar begins at 00:00. Overlapping intervals are combined. Return the start as HH:MM, or -1 when no meeting fits.

Function

earliestCommonMeetingStart(busy: String[][], duration: int) → String

Examples

Example 1

busy = [["A","focus","02:00","10:00"],["B","lunch","12:00","12:59"]]duration = 180return = "13:00"

Minute 13:00 begins the first three-hour span after both inclusive busy intervals.

Example 2

busy = [["A","focus","02:00","10:00"],["B","lunch","12:00","12:59"]]duration = 90return = "10:01"

The first busy interval ends at 10:00 inclusive, so the earliest ninety-minute meeting begins at 10:01.

Constraints

  • 0 <= busy.length <= 10000.
  • Every row has four strings; start and end are valid same-day times with start no later than end.
  • 1 <= duration <= 1440.

More Visa Online Assessment questions

  • Count Prime Values in SubtreesOA · Seen Nov 2026
  • Lock CodeOA · Seen Nov 2026
  • Minimum-Sum Tree Fill with Unit StepsOA · Seen Nov 2026
  • Longest Non-Decreasing Substring After Pair SwapsOA · Seen Oct 2026
  • Count Attack Vectors by Divisor RangeOA · Seen Oct 2026
  • Minimum Operations to Reduce a Transaction LedgerOA · Seen Oct 2026
  • Count Valid Space-Delimited WordsOA · Seen Oct 2026
  • Maximum Index-Weighted Sum with Disjoint SwapsOA · Seen Oct 2026
  • Maximum Equalized Substrings After One Adjacent SwapOA · Seen Sep 2026
  • Minimum Values with Even Powers of TwoOA · Seen Sep 2026

Similar questions at other companies

  • Earliest Time to Schedule a MeetingMathWorks · OAMathWorks interview questions
  • Earliest Meeting Start on a 24-Hour ClockIMC Trading · OAIMC Trading interview questions
  • Earliest Time to Schedule a MeetingMicrosoft · OAMicrosoft interview questions
  • Smallest Most-Lit Street PositionHudson River Trading · OAHudson River Trading interview questions
  • Most Visited Sprint MarkerChubb · OAChubb interview questions
  • Earliest Common Meeting TimeZipRecruiter · OAZipRecruiter interview questions
  • File Download Coverage PercentagePersona · OAPersona interview questions
  • Peak Chat Load Across AgentsCresta · PHONE SCREENCresta interview questions
  • Majority Labels over Audio IntervalsNooks · PHONE SCREEN
  • Zero Array Transformation IGoogle · ONSITE INTERVIEWGoogle interview questions
All Visa interview questionsSee Visa hiring insights
Saved
class Solution {
    public String earliestCommonMeetingStart(String[][] busy, int duration) {
        // Write your code here.
    }
}
Checking account…