AlgoMaster Logo

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

nums=[8, 2, 4, 7],limit=4
0 / 9
algomaster.io
Step:Brute force: try every start, extend while |max - min| <= 4.