You are given n strings and you have to arrange anagram strings in separate line in order. for example:
Input:
n = 7
aabbcc
acbabc
abccba
bcba
ab
aa
abbc
Output:
aa
aabbcc abccba acbabc
ab
abbc bcba
Explanation: output strings in same lines are anagram in Lexicographically order also strings in different lines are also Lexicographically arranged.
I am trying to solve the problem but my code showing runtime error
here is my code: Anagrams
please help









I don't know where is your mistake but your algorithm is not the best.
Can you suggest me better approach.
I dont know ur problem but u could write
instead of ur code
I found the correct code.. Here is the correct code
Anagram
http://ideone.com/IhjnMK