My code gets "Output limit exceeded". It definitely does not happen for every test case, as I have tested it on my computer. Is there a way to get a test case for which this happens?
In general, output limit exceeded is your code generate too much output for test case. You may detail your question, like paste your code with some key comment and give the brief algorithm, others can help you a lot depend that.
I experienced the same problem, it turned out that this problem requires the output of ArrayList<String> containing only anagram words, instead of "sort the whole String according in an anagram order".
I still don't get it. I don't sort anything, I am indeed returning a list of JUST anagram words.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.