• + 0 comments

    simple cpp solutions

    int designerPdfViewer(vector h, string word) {

    int maxheight=0;
    

    for(char c :word){ int a= c -'a'; maxheight=max(maxheight,h[a]); } int area=maxheight * word.length(); return area; }