ranged query kth character in list of strings
for(int i=0;i<words.size();i++){
for(char ch : words[i]){
mat[i][ch-'a']++;
}
}
ranged query kth character in list of strings
for(int i=0;i<words.size();i++){
for(char ch : words[i]){
mat[i][ch-'a']++;
}
}
ranged query kth character in list of strings
char determine_character(vector<string> words, int l, int r, int k){
int sum=0;
for(int i=0;i<26;i++){
for(int j= l-1;j<=r-1;j++)
sum += mat[j][i];
if(sum>=k)
return 'a' + i;
}
return 'z';
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us