You are viewing a single comment's thread. Return to all comments →
List alphabet = new ArrayList<>();
for(int i=0;i<26;i++){ alphabet.add((char)('a'+i)); } int index=0; List<Integer> addIndexes = new ArrayList<>(); for(int i=0; i<word.length();i++){ char charletter = word.charAt(i); index = alphabet.indexOf(charletter); addIndexes.add(h.get(index)); } return word.length()*Collections.max(addIndexes);
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 →
List alphabet = new ArrayList<>();