80ms c++ acquired solutiong,how to improve


  • 0
    1

    class Solution {
    public:
    bool isAnagram(string s, string t) {
    sort(s.begin(),s.end());
    sort(t.begin(),t.end());
    return s==t;
    }
    };


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.