You are viewing a single comment's thread. Return to all comments →
JAVA 18 public static void checkMagazine(List magazine, List note) {
boolean isFound = true; for(String word : note){ if(!magazine.contains(word)){ isFound = false; }else{ magazine.remove(word); } } if(isFound){ System.out.println("Yes"); }else{ System.out.println("No"); } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
JAVA 18 public static void checkMagazine(List magazine, List note) {
}