Maximize Efficiency with TikTok

Problem Overview

  • This problem asks you to choose exactly five numbers from efficiencyScores so their product is as large as possible.
  • Input: n (5–100000) and efficiencyScores with values in [-1000, 1000]; Output: the maximum product as an integer.
  • Real-world context: TikTok research facility modeling task efficiency for content creation.
  • From TikTok interviews, used as a coding interview question on arrays and products.

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: