Photo by Malte Wingen on Unsplash

Before Going Through the Code Here is a Beginner’s Guide to Java

Designer PDF Viewer

static int designerPdfViewer(int[] h, String word) {
int max_h=h[0];
char words[]=word.toCharArray();
int i=0;
while(i<word.length())
{
if(h[words[i]-97]>max_h)
max_h=h[words[i]-97];
i++;
}
int ans=(i*max_h);
return ans;

}

1 3 1 3 1 4 1 3 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7
zaba

Code -> Understand-> Repeat is my motto. I am a Data Engineer who writes about everything related to Data Science and Interview Preparation for SDE.