Sponsored
Use these hints if you're stuck. Try solving on your own first.
You can check the opposite: check if there is a ‘b’ before an ‘a’. Then, negate and return that answer.
s should not have any occurrences of “ba” as a substring.
Solve with full IDE support and test cases