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 .
More Codesignal Interview Questions
InterviewDB
AI-Assisted Code Review Assessment - Coding Interview
InterviewDB
Array Mutation Operations - Coding Interview
InterviewDB
Array Triplets with Pythagorean Property - Coding Interview
InterviewDB
Banking System Simulation - Industry Coding Framework Interview
InterviewDB
Bubble Popping Game Simulation - Coding Interview