Given an array of integers representing sensor readings, find the longest contiguous subarray where the difference between the maximum and minimum elements is less than a given threshold.
Problem
Given an array of integers representing sensor readings, find the longest contiguous subarray where the difference between the maximum and minimum elements is less than a given threshold.
Your answer
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.