Given a sequence of words, print all anagrams together using STL
Given an array of words, print all anagrams together. For example, Input: array = {âcatâ, âdogâ, âtacâ, âgodâ, âactâ}output: cat tac act, dog godExplanation: cat tac and act are anagrams and dog and god are anagrams as they have the same set of characters.Input: array = {âabcâ, âdefâ, âghiâ}output: