picking numbers hackerrank solution

Picking Numbers Hackerrank Solution

CODE : Given an array of integers, find the longest subarray where the absolute difference between any two elements is less than or equal to   .