1class Solution {2 public boolean checkString(String s) {3 for (int i = 0; i < s.length(); i++) {4 if (s.charAt(i) == 'b') {5 for (int j = i + 1; j < s.length(); j++) {6 if (s.charAt(j) == 'a') {7 return false;8 }9 }10 }11 }12 return true;13 }14}
WPM •0 •0
ACC •0 •0
TIME •0