Sponsored
Use these hints if you're stuck. Try solving on your own first.
With the constraints, could we generate every possible string?
Yes we can. Now we just need to check if the string meets all the conditions.
Solve with full IDE support and test cases