Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Anagram String | Lexicographically Sorted

$
0
0

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: http://ideone.com/UoJmN0

please help


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>