Sponsored
Use these hints if you're stuck. Try solving on your own first.
Check every subarray, since constraints are small.
Solve with full IDE support and test cases