DFS. Top Down. Easy to understand. TLE...
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def longestSubsequence(self, nums: List[int]) -> int:

        # hs = defaultdict(dict)

        # for i in range(len(nums)):
        #     for j in range(i + 1, len(nums)):
        #         if j in hs[i]:
        #             hs[i][j] = max(abs(nums[j] - nums[i]), hs[i][j])
        #         else:
        #             hs[i][j] = abs(nums[j] - nums[i])

        # @cache
        # def dfs(node, value):

        #     if not hs[node]:
        #         return 0

        #     mx = 0
        #     for n in hs[node]:
        #         if hs[node][n] <= value:
        #             mx = max(mx, 1 + dfs(n, hs[node][n]))

        #     return mx

        # mx = 0
        # for i in range(len(nums) - 1, -1, -1):
        #     mx = max(mx, 1 + dfs(i, 300))

        # return mx

```
['Python3']