Form biggest no

FORM BIGGEST NUMBER
You are provided an array of numbers. You need to arrange them in a way that yields the largest value.

Input Format:
6054854654

Constraints:
1<=t<=100 1<=m<=100 1<=A[i]<=10^5

Output Format
Print the largest value.

Sample Input
1
4
54 546 548 60
Sample Output
6054854654

what should be the approach anyone can give me hint

Try using something like bubble sort, comparing to adjacent numbers, but they should be swapped only through a separate function. That function should take the two numbers as arguements, and try to make both its combinations, so as to tell if the numbers have to be swapped or not…