Datadog OA 2025 | Sliding Window, Cycle Detection & Matrix Transpose
Question · Posted Jun 2026
Problem 1 - Telemetry Stream Window Peak Detector Problem Statement You are monitoring infrastructure memory usage through a stream of telemetry metrics. You are given: An integer array memoryLogs. An integer K representing the maximum allowed variance. Your task is to find the maximum length of a contiguous subarray such that: max(window) − min(window) ≤ K Return the maximum valid window length. Constraints Constraint 1 ≤ N ≤ 105 0 ≤ memoryLogs[i] ≤ 106 0 ≤ K ≤ 106 Test ...
The full answer & interview discussion are available to premium members.
Log in Create a free account