TikTok Metrics Analysis

Problem Overview

  • Find the longest consecutive subarray where every metric > limit divided by the subarray length.
  • Input: array financialMetrics (size n, 1≤n≤1e5; values up to 1e9) and limit; Output: maximum length, or -1 if none exists.
  • Domain: financial metrics analysis for optimizing TikTok’s analytics pipeline.
  • Company: ByteDance/TikTok; this coding interview problem is an interview question from TikTok interviews.

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: