// Count Good Triplets — MEDIUM
// Category: array
Given an array of integers `arr` and three integers `a`, `b`, `c`, find all the **good triplets**.
A triplet `(arr[i], arr[j], arr[k])` is good if:
- `0 <= i < j < k < arr.length`
- `|arr[i] - arr[j]| <= a`
- `|arr[j] - arr[k]| <= b`
Example: arr = [3,0,1,1,9,7], a = 7, b = 2, c = 3
Output: 4