标签:
排序判断相等即可
class Solution { public: bool isAnagram(string s, string t) { sort(s.begin(),s.end()); sort(t.begin(),t.end()); if(s==t) return true; return false; } };
leetcode 242
原文地址:http://www.cnblogs.com/thefirstfeeling/p/5693951.html