Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use two loops to check all the subarrays.
Solve with full IDE support and test cases