Solution to Sort Array For Min Number from Jobdu

31 Aug

Question (in Chinese):

Question Name: Sort Array For Min Number

Question Description: Given an integer array, concatenate them as in their string representation, and find out the minimum one among the concatenated results.

Input: the input might contain multiple test cases. Each test case contains two lines. The first line includes one integers N (1<= N <=100), saying the size of test array. The second line includes N integers (0 <= each item <= 10000000), as the content of the test array.

Output: For each test case, print the minimum concatenated result.

The solution is:

Leave a Reply

Your email address will not be published. Required fields are marked *