Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit at Uber

Medium57.3% acceptance

This problem has 87.5% frequency at Uber.

Problem Description

Given an array of integers `nums` and an integer `limit`, return the size of the longest **non-empty** subarray such that the absolute difference between any two elements of this subarray is less than or equal to `limit` _._

Read full problem and hints

Topics

Also asked at 13 companies


More Uber Questions

View all Uber questions