Search⌘ K
AI Features

Longest Subarray With Diff At Most Limit

Longest Subarray With Diff At Most Limit asks you to find the length of the longest non-empty subarray where every pair of values differs by at most the given limit.

Statement

Given an integer array nums and an integer limit, return the size of the longest non-empty ...