File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/ctci/arraysandstrings Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 66 */
77public class IsUnique {
88
9- private static boolean hasAllUniqueCharacters (String str ) {
9+ public static boolean hasAllUniqueCharacters (String str ) {
1010 if (str == null || str .length () > 128 ) return false ;
1111
1212 boolean [] charSet = new boolean [128 ]; // assuming the string contains only ASCII characters
@@ -20,7 +20,7 @@ private static boolean hasAllUniqueCharacters(String str) {
2020 return true ;
2121 }
2222
23- private static boolean hasAllUniqueCharactersWhenStringContainsAllLowercase (String s ) {
23+ public static boolean hasAllUniqueCharactersWhenStringContainsAllLowercase (String s ) {
2424 int checker = 0 ;
2525 for (int i = 0 ; i < s .length (); i ++) {
2626 int charValue = s .charAt (i ) - 'a' ;
You can’t perform that action at this time.
0 commit comments