mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
style: enable NeedBraces in checkstyle (#5227)
* enable style NeedBraces * style: enable NeedBraces in checkstyle --------- Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:
committed by
GitHub
parent
51fcc66345
commit
87b17e0571
@@ -29,8 +29,11 @@ public final class Pangram {
|
||||
public static boolean isPangramUsingSet(String s) {
|
||||
HashSet<Character> alpha = new HashSet<>();
|
||||
s = s.trim().toLowerCase();
|
||||
for (int i = 0; i < s.length(); i++)
|
||||
if (s.charAt(i) != ' ') alpha.add(s.charAt(i));
|
||||
for (int i = 0; i < s.length(); i++) {
|
||||
if (s.charAt(i) != ' ') {
|
||||
alpha.add(s.charAt(i));
|
||||
}
|
||||
}
|
||||
return alpha.size() == 26;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user