InterviewDB Question

Consistent Latency Analysis - Coding Interview

Question Details

Problem You are given a list of service latency measurements (in ms) over time as (timestamp, latency). A period is "consistent" if every measurement within it falls within [median - d, median + d] for a given tolerance d, where median is computed over the entire period. Find the longest consistent period (contiguous subarray of measurements). Example: Constraints: n <= 10^4. Follow-ups Computing the median for every subarray is expensive. What is the brute-force complexity? Can binary search he…

Full Details

🔒

Unlock all Codesignal questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a reported interview question from a codesignal interview.

It covers the following topics: Q4, Sliding Window, Binary Search, General Coding Assessment, Coding, Arrays .