diff --git a/java/Count the Number of Consistent Strings.java b/java/Count the Number of Consistent Strings.java new file mode 100644 index 000000000..cc40b86d1 --- /dev/null +++ b/java/Count the Number of Consistent Strings.java @@ -0,0 +1,24 @@ +class Solution { + public int countConsistentStrings(String allowed, String[] words) { + Set allow = new HashSet<>(); + int count = 0; + + for(int i=0; i