From dc144b30468f1adad06f7c2fadbfa7f87b2eebef Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Tue, 12 Aug 2025 20:52:45 +0800 Subject: [PATCH] update --- src/8/12/group-anagrams.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/8/12/group-anagrams.cpp b/src/8/12/group-anagrams.cpp index 1286b9e..13ef38c 100644 --- a/src/8/12/group-anagrams.cpp +++ b/src/8/12/group-anagrams.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include using namespace std; @@ -5,7 +8,17 @@ using namespace std; class Solution { public: vector> groupAnagrams(vector& strs) { - + unordered_map> m; + for(int i=0;i> ans; + for(auto s :m){ + ans.push_back(std::move(s.second)); + } + return ans; } };