You are given a list of integers. Write a function to return the length of the longest subarray where the sum of elements is less than or equal to a given target value.
Example:
Input:
[10, 5, 2, 6, 1, 8]
Output:
4
Make sure you return your solution, don't print!
AI
Bot
Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.