AlgoMaster Logo

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

nums=[8, 2, 4, 7],limit=4
0 / 28
80214273MaxDeque (decreasing)MinDeque (increasing)maxLen: 0spread: -limit: 4
algomaster.io
Step:Start: find longest subarray with |max - min| <= 4