Why are my test cases failing in case of using a different comparator function


Pls see this code

Hello @kunal81198 This question demands number of test cases in input and you are not doing that .
you have to solve this for multiple test cases and print every output in new line .
i have made changes in your code please see the code .
plus there is some modification which i have made in your compare function as well .
you method wouldnt pass all test cases.

I hope ,i have cleared your doubt .
Happy Learning !!

Which test cases arent passing can u pls write the test cases you can think of?

Hello @kunal81198 In question its demanding input for multiple test cases and to print the answer for every test case in new line .
you are not taking input for every test case .that why its generating the error .
ans the compare function which you are using is only comparing the values .
here is one sample test case.
INPUT:
1
4
0 90 32 9009

EXPECTED OUTPUT: 909009320
YOUR CODE OUTPUT:900990320
you can do this by appending string ‘A’ with ‘B’ and string ‘B’ with ‘A’…
here is the link of the code for your reference.

i hope i have cleared your doubt .
Happy Learning !!

I hope I have cleared your doubt.
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.

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.