diff --git a/Leetcode Group Anagrams.cpp b/Leetcode Group Anagrams.cpp new file mode 100644 index 0000000..1ccd7d5 --- /dev/null +++ b/Leetcode Group Anagrams.cpp @@ -0,0 +1,23 @@ +class Solution { +public: + vector> groupAnagrams(vector& strs) { + vector>ans; // created a ans vector to store our answer + + int n=strs.size(); +// created a unorderes map to stor the mapping b/w the sorted word and orginal word + + + unordered_map>mp; + + for(int i=0;i