Skip to main content
Technical

Given an array of integers and a number N, find the length of the longest contiguous subarray such that the difference between any two elements in the subarray is less than N.

Top community answer

No community answers yet.

Contribute an answer

Have a better answer?

Share your experience and earn credits toward your next interview session.

Contribute an answer