All Tracks Basic Programming Implementation Basics of Implementation Problem

Sagar's Gift
Tag(s):

Easy

Problem
Editorial
Analytics

Today is Sagar's birthday. He got array of numbers as a gift by his father. His father told him that he has another gift if Sagar is able make largest number by concatenating the numbers and swapping the digits of numbers. Help Sagar to make largest number from the given numbers.

Input:

First line contains number of testcases T Next line contain value of number of values in array N Followed by N space separated number

Output:

Output the answer.

Constraint :

1<= T <=10

1<= N <=100

1<= a[i] <= 10000

SAMPLE INPUT
2
5
1 2 20 31 5
4
9 1 5 10
SAMPLE OUTPUT
5322110
95110
Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: C, C++, C++14, Clojure, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Java 8, JavaScript(Rhino), JavaScript(Node.js), Julia, Kotlin, Lisp, Lisp (SBCL), Lua, Objective-C, OCaml, Octave, Pascal, Perl, PHP, Python, Python 3, R(RScript), Racket, Ruby, Rust, Scala, Swift, Visual Basic

CODE EDITOR

Initializing Code Editor...
Your Rating:

Contributor

Notifications
View All Notifications