Not able to adjust the size of input array and no. of test cases
The code is working when you only take array elements as input .
Hi, @rachiitgupta, the code which you have written is all wrong and complicated except for the part in lines 21-27, whose logic is correct. Pls see the question again and take input and print output as desired by question. You have to first input no. of testcases then n and then array elements. Just input the no. n even if you are not using it.
Your logic to sort the strings is absolutely correct. But write another code where the flow o program is same as desired by the question.
Hope this helps
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.