All test-cases are failing for Anagrams together

Link for my solution - https://ide.codingblocks.com/s/442845

Althogh, I have written right solution, still all of my test-cases are failing

I think this is due to order of my output, but the description of question says - The order of your output does not matter.

Is there any way, I can improve my solution ?

hello @maheshghamand

it matters bro .
submit it over leetcode.

yeah instead of sorting the string(N LOG N) to get key. u can build some other hasH function o(N).

sample input given

6
eat
tea
tan
ate
nat
bat

sample output provided

eat tea ate 
bat 
tan nat 

order-type-1

  • sort the sorted-strings as - abt, aet, ant
  • solution would be
bat
eat tea ate
tan nat

order type 2

  • put them according to their occurence
  • solution would be
eat tea ate
tan nat
bat

The sample output is not following both of above orders, can you tell me which order they are following ?

there is not any specific order that they are following (some random order, depends on the implementation they used to generate test files).
thats why i m telling u to submit it over leetcode.

Are they going to update, this problem in any near future ? and if they can I know it ?

i already reported this quite a long time back .
actually the current judge is unable to validate multiple valid solutions so they need to make changes in the judge itself and it is going to take time.
use leetcode for this problem.

OK, thanks for the help :wave:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.