Run error in form biggest number

Hi @vivek21,
Your code is running fine for me but your logic is wrong so it is giving wrong answer.

I had solvede the question and has written a code but i doubt if my code is efficient.

I had done an approach in which I made a global ArrayList of String and stored all permutations of array in it.
then compared all elements of arraylist and returned the biggest one.
after printing, i emptied the global arraylist for use in next testcase.

testcase is correct and i got 100 points but I believe it may have another approach. Please guide if there is another efficient approach.

Yes there is another way in which you can write your own compare function which takes two string str1,str2 as parameters and then compares str1+str2 and str2+str1 for the bigger string … The bigger string is then taken as a result … for example if string are 65 526 then it would compare 65526 and 52665 for the bigger string and you loop this compare function to compare every two elements in the array.