Skip to content

Commit

Permalink
Time: 27 ms (23.68%), Space: 7.3 MB (55.87%) - LeetHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Monalisa0311 committed Oct 6, 2022
1 parent cf3dab7 commit 4e9f1be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 242-valid-anagram/242-valid-anagram.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Solution {
public:
bool isAnagram(string s, string t) {
sort(s.begin(),s.end());
sort(t.begin(),t.end());
return (s==t);
}
};

0 comments on commit 4e9f1be

Please sign in to comment.