You are viewing a single comment's thread. Return to all comments →
Simple Java Code to Understand
public static int designerPdfViewer(List<Integer> h, String word) { Map<Character,Integer> map = new HashMap<>(); Character ch = 'a'; for(int i=0;i<h.size();i++){ map.put(ch, h.get(i)); if(ch == 'z'){ break; } ch++; } char[] chArray = word.toCharArray(); List<Integer> itr = new ArrayList<>(); for(Character chr : chArray){ itr.add(map.get(chr)); } int highestValue = Collections.max(itr); int n = itr.size(); int areaOfRech = highestValue * n; return areaOfRech; }
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 →
Simple Java Code to Understand