FastPrepGet Max Traffic Time
Problems/Get Max Traffic Time

Get Max Traffic Time

IBM logoIBM● MediumFULLTIMEOA

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

There is client/server architecture with n clients and one server. Each client starts its interaction with the server at the second start[i] and stops at the second end[i]. The maximum traffic is defined as the maximum number of concurrent interactions with the server.

Find the earliest time at which the maximum number of clients are interacting with the server.

Note: The endpoint is also included in the interaction.

Function

getMaxTrafficTime(start: int[], end: int[]) → int

Complete the function getMaxTrafficTime in the editor below.

getMaxTrafficTime has the following parameters:

  1. int start[n]: interaction start times
  2. int end[n]: interaction end times

Returns int: the earliest time of maximum concurrent interactions

Examples

Example 1

start = [1, 6, 2, 9]end = [7, 8, 6, 10]return = 6
Example 1 illustration

The maximum number of concurrent interactions is 3 which happens first at the 6th second. Return 6.

Example 2

start = [2, 3, 7, 4, 7]end = [4, 5, 8, 7, 10]return = 4

🐈‍⬛

Constraints

  • 1 ≤ n ≤ 10^5
  • 1 ≤ start[i] ≤ end[i] ≤ 10^9

More IBM interview questions

  • Missing IntervalsOA · Seen Nov 2026
  • Last Object Exit TimeOA · Seen Nov 2026
  • Count Peaks and ValleysOA · Seen Nov 2026
  • Count Strictly Increasing Contiguous WindowsOA · Seen Nov 2026
  • Total Each Letter's Count in an Encoded StringOA · Seen Nov 2026
  • Count Servers With No Requests in a Time WindowOA · Seen Nov 2026
  • Alternate Odd and Even Numbers with Two GoroutinesPHONE SCREEN · Seen Nov 2026
  • Longest Substring Without Repeating CharactersPHONE SCREEN · Seen Nov 2026
  • Maximum Easy Tasks After RearrangingOA · Seen Nov 2026
  • Longest Palindromic SubstringPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Merge IntervalsApple · OA · PHONE SCREEN · ONSITE INTERVIEW
  • Earliest Meeting Time for All EmployeesCapital One · OA
  • Maximum Interactive Team SizeMicrosoft · OA
  • Largest Team Where Every Pair OverlapsWalmart · OA
  • Minimum Cars for Rental RequestsGoogle · OA · PHONE SCREEN · ONSITE INTERVIEW
  • Minimum Meeting RoomsJP Morgan Chase · OA
  • Merge Overlapping IntervalsGoldman Sachs · OA
  • Maximum Concurrent ProcessesMorgan Stanley · OA · ONSITE INTERVIEW
  • Track Received Byte RangesRoblox · OA
  • Merge IntervalsBloomberg LP · OA · PHONE SCREEN · ONSITE INTERVIEW

IBM interview experiences

  • IBM Full-Time SWE OA Questions: 1 Experience
  • IBM Software Intern Résumé Rounds: 2 Experiences (Part 3 of 3)
  • IBM Intern Blitz Interviews: 23 Experiences (Part 2 of 3)
  • IBM Software Intern Interviews: 44 Experiences (Part 1 of 3)
  • IBM Software Intern Interview Questions: 15 Experiences
See IBM hiring insights
Saved
class Solution {
    public int getMaxTrafficTime(int[] start, int[] end) {
      // write your code here
    }

}
Checking account…