HackerRank Solutions/Algorithms/Implementation/Designer PDF Viewer.cpp
int designerPdfViewer(vector<int> h, string word) {
    int maxHeight = 0;
    int width = word.size();
    for (int i = 0; i < width; i++) {
        maxHeight = max(maxHeight, h[word[i] - 'a']);
    }
    return maxHeight * width;
}
// Complete the designerPdfViewer function below.
Complete the designerPdfViewer function below.
Complete the designerPdfViewer function below .
int designerPdfViewer(vector<int> h, string word) {
    int maxHeight = 0;
    int width = word.size();
    for (int i = 0; i < width; i++) {
        maxHeight = max(maxHeight, h[word[i] - 'a']);
    }
    return maxHeight * width;
}
int designerPdfViewer ( vector < int > h , string word ) { int maxHeight = 0 ; int width = word . size ( ) ; for ( int i = 0 ; i < width ; i ++ ) { maxHeight = max ( maxHeight , h [ word [ i ] - ' ' ] ) ; } return maxHeight * width ; }
Complete the designerPdfViewer function below.
Complete the designerPdfViewer function below .