题目
太简单了,直接上代码:
class Solution {
public:
char nextGreatestLetter(vector<char>& letters, char target) {
int n = letters.size();
int a[] = {};
for(int i = ;i < n; ++i){
a[letters[i]-'a']++;
}
for(int i = (target-'a'+)%; ; i++,i%=){
if(a[i] > ) return (char)(i + 'a');
}
}
};