Sponsored
Use these hints if you're stuck. Try solving on your own first.
As the constraints are low, you can check each subarray for the given condition.
Solve with full IDE support and test cases