Given an array of strings strs , group the anagrams together. Return the groups in any order , and the strings within each group in any order. Two strings are anagrams when one is a rearrangement of the other. Input format Input is [strs] , e.g. [[ eat , tea , tan , ate , nat , bat ]] .