mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 06:55:02 +08:00
Update Pangram.java using Java Collections (#4479)
* Update Pangram.java using Java Collections A simple separate function isPangramOrNot(String s) has been created which implements the Pangram checking of a string using Java Collection Framework approach. * Update Pangram.java using Java Collections * Updated some linting errors in Pangram.java * Update src/main/java/com/thealgorithms/strings/Pangram.java Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com> * Updated Pangram.java Method name updated to - isPangramUsingSet(String s) * Updated the testcases PangramTest.java Successfully updated the testcases in this same PR branch --------- Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
This commit is contained in:
@ -17,5 +17,10 @@ public class PangramTest {
|
||||
assertFalse(Pangram.isPangram2("The quick brown fox jumps over the azy dog")); // L is missing
|
||||
assertFalse(Pangram.isPangram2("+-1234 This string is not alphabetical"));
|
||||
assertFalse(Pangram.isPangram2("\u0000/\\ Invalid characters are alright too"));
|
||||
|
||||
assertTrue(Pangram.isPangramUsingSet("The quick brown fox jumps over the lazy dog"));
|
||||
assertFalse(Pangram.isPangramUsingSet("The quick brown fox jumps over the azy dog")); // L is missing
|
||||
assertFalse(Pangram.isPangramUsingSet("+-1234 This string is not alphabetical"));
|
||||
assertFalse(Pangram.isPangramUsingSet("\u0000/\\ Invalid characters are alright too"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user