You are viewing a single comment's thread. Return to all comments →
List<Character> list = new ArrayList<>(); for(int i=0; i < arr.get(0).length(); i++){ if(!list.contains(arr.get(0).charAt(i))) list.add(arr.get(0).charAt(i)); } for(int i=1; i <= arr.size()-1; i++){ String ch = arr.get(i); for(int j = 0; j < list.size(); j++){ if(!ch.contains(list.get(j)+"")){ list.remove(j); j--; } } } return list.size();
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →