2021-09-11から1日間の記事一覧
sortを使う方法 '''cpp class Solution { public: bool isAnagram(string s, string t) { sort(s.begin(), s.end()); sort(t.begin(), t.end()); if(s ==t){ return true; } else{ return false; } } }; unordered_mapに入れてから比較 class Solution { pub…
sortを使う方法 '''cpp class Solution { public: bool isAnagram(string s, string t) { sort(s.begin(), s.end()); sort(t.begin(), t.end()); if(s ==t){ return true; } else{ return false; } } }; unordered_mapに入れてから比較 class Solution { pub…