← previousnext →
Problem
Return true if "ab" appears before "ba" in s.
Examples
hasAbBeforeBa("abxxxba") -> truehasAbBeforeBa("baxab") -> false
Return true if "ab" appears before "ba" in s.
hasAbBeforeBa("abxxxba") -> truehasAbBeforeBa("baxab") -> false