We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31f7aff commit c68f0e2Copy full SHA for c68f0e2
Java/valid-anagram.java
@@ -72,7 +72,7 @@ else if(s.isEmpty()){ // empty string check
72
// Time: O(n) | Space: O(1) [because the table's size stays constant no matter how large n is]
73
public boolean isAnagram(String s, String t) {
74
75
- int [] charCount = new int[128]; // take 256 in case of unicode characters.
+ int [] charCount = new int[128];
76
77
for (int i=0; i<s.length(); i++){
78
charCount[s.charAt(i)]++;
0 commit comments