You are viewing a single comment's thread. Return to all comments →
public static int designerPdfViewer(List<Integer> h, String word) { char start = 'a'; int end = start+26; Map<Character, Integer> map = new LinkedHashMap<>(); for(int i=start, j=0; i<=end && j<h.size(); i++, j++) { map.put((char)i, h.get(j)); } int maxHeight = Arrays.stream(word.split("")).mapToInt(s -> { Character c = s.charAt(0); return map.get(c); }).max().orElse(0); return maxHeight * word.length(); }
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 →