[AMAZON]Print Anagrams

Given an array of strings, please complete the function printAnagrams which prints each anagram pair in every line. Any word that exactly reproduces the letters in another order is an anagram. Anagrams are case-insensitive

Sample Test Cases: 

Input #00: 
Resistance, Ancestries, Gainly, Laying, test, troop 

Output #00: 
Resistance Ancestries 
Gainly Laying 

Explanation
Re-arranging "Resistance" gives "Ancestries", similarly re-arranging "Gainly" results in "Laying". 
As stated in the problem, anagrams are case-insensitive

Comments

Popular posts from this blog