// Complete the designerPdfViewer function below.
int designerPdfViewer(vector<int> h, string word)
{
int max=0;
for(int i=0;i<word.size();i++)
{
int a=h[int(word[i])-97];
if(a>max)
{
max = a;
}
}
return max*word.size();
}
Add your comment