• + 4 comments
    static int designerPdfViewer(int[] h, String word) {
            // Complete this function
            int width = 0;
            int temp = 0;
           
            for(int i = 0;i<word.length();i++){
                int ascii =(int)word.charAt(i);
                int height = h[ascii- 97];
                if(height>temp){
                    temp = height;
                }
            }
            return temp*word.length();
        }
    
    /simpler i guess