Longest Telemetry Window With Few Thermal Throttle Samples

Last updated: November 29, 2026

Quick Overview

Given a list of GPU junction temperature samples, a throttle limit and an integer k, return the length of the longest contiguous window that contains at most k samples above the limit.

AMD
Coding & Algorithms
Software Engineer
AMD
November 29, 2026
Software Engineer
Online Assessment
Coding & Algorithms
Easy

0

0

0 solved


Given a list of GPU junction temperature samples, a throttle limit and an integer k, return the length of the longest contiguous window that contains at most k samples above the limit.

An online assessment style problem grounded in AMD power and thermal tooling, where engineers look for the longest stable stretch of a benchmark run before a Radeon or Instinct part starts throttling. The interviewer checks the sliding window pattern and correct shrinking of the left edge.

What the Interviewer Expects
  • Recognize a variable-size sliding window
  • Keep a running count of samples above the limit
  • Shrink from the left only while the count exceeds k
  • Update the best length on every step
  • Achieve O(n) time and O(1) space
Key Topics to Cover
sliding window
two pointers
streaming telemetry
counting
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • Return the start and end index of the window as well as its length.
  • How would you handle a live stream where you only keep the last hour of samples?
  • What if the condition were the max minus min temperature in the window staying under a bound?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: temps (list of numbers), limit, and k >= 0. A sample is hot if t > limit. Output: maximum length of a contiguous subarray with at most k hot samples. Empty input returns 0....

High-Level Design

Use two pointers. Extend right one sample at a time and increment over when that sample is hot. While over > k, advance left, decrementing over when the sample leaving is hot. After the wind...


Submit Your Answer
Markdown supported

Related Questions