Skip to content

Commit

Permalink
Add # as separator in key formulation
Browse files Browse the repository at this point in the history
  • Loading branch information
rlempka committed Aug 6, 2023
1 parent 0383521 commit 340a837
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/0049-group-anagrams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class Solution {
}

string key = "";
for (int i = 0; i < 26; i++) {
key.append(to_string(count[i] + 'a'));
for (int i = 0; i < count.size(); i++) {
key.append(to_string(count[i]) + '#');
}
return key;
}
Expand Down

0 comments on commit 340a837

Please sign in to comment.