Maximum Quality Sum

Problem Overview

  • Assign every packet to exactly one channel so each channel has at least one packet, maximizing the sum of channel qualities (medians), and round the final sum up.
  • Input/Output: packets array and integer channels (1..len(packets)); return the maximum sum; n up to 5e5, packet size up to 1e9.
  • Context: AWS server channel stress-test where quality is the median of its packet sizes.
  • From Amazon interviews: a coding interview interview question problem.

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: