Maximum User Traffic

Problem Overview

  • Determine how many days have the maximum number of users online, given each user's login and logout days.
  • Input: arrays login[n] and logout[n] with 1≤n≤1e5, 0≤values≤1e5, and login[i]≤logout[i]; logins occur before logouts on the same day; Output: an integer count of days with peak traffic.
  • Context: Tracks daily user activity in the Amazon Shopping app during the festive season.
  • Asked in Amazon interviews; a common coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: