We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
classResult{/* * Complete the 'designerPdfViewer' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER_ARRAY h * 2. STRING word */publicstaticintdesignerPdfViewer(List<Integer>h,Stringword){// Write your code hereStringalpha="abcdefghijklmnopqrstuvwxyz";intmax=0;intlen=word.length();for(inti=0;i<len;i++){charcurr=word.charAt(i);//tfor(intj=0;j<alpha.length();j++){charcu=alpha.charAt(j);if(curr==cu){if(h.get(j)>max){max=h.get(j);}}}}returnlen*max;}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Designer PDF Viewer
You are viewing a single comment's thread. Return to all comments →
Java Solution