Task
 
Given a set of positive integers, write a function to order the integers in such a way that the concatenation of the numbers forms the largest possible integer and return this integer.

Use the following two sets of integers as tests   and   show your program output here.

   {1, 34, 3, 98, 9, 76, 45, 4}
   {54, 546, 548, 60}


Possible algorithms

 A solution could be found by trying all combinations and return the best. 
 Another way to solve this is to note that in the best arrangement, for any two adjacent original integers X and Y, the concatenation X followed by Y will be numerically greater than or equal to the concatenation Y followed by X.
 Yet another way to solve this is to pad the integers to the same size by repeating the digits then sort using these repeated integers as a sort key.


See also

   Algorithms: What is the most efficient way to arrange the given numbers to form the biggest number?
   Constructing the largest number possible by rearranging a list


'Largest int from concatenated ints
 
Public Sub Main()
Dim iList1 As Integer[] = [1, 34, 3, 98, 9, 76, 45, 4]      'Integer list 1
Dim iList2 As Integer[] = [54, 546, 548, 60]                'Integer list 2
 
Calc(iList1)                                                'Send List 1 to Calc routine 
Calc(iList2)                                                'Send List 2 to Calc routine
 
End
'_________________________________________________________________________________________
 
Public Sub Calc(iList As Integer[])
Dim siCount1, siCount2, siCounter As Short                  'Counters
Dim sList As New String[]                                   'To hold converted integers
Dim bTrigger As Boolean                                     'To trigger a found match
 
For Each siCount1 In iList                                  'For each integer in the list..
  sList.Add(Str(siCount1))                                  'Convert to a string and add to sList
  If Len(Str(siCount1)) > siCounter Then                    'If the length of the string is greater than siCounter then..
    siCounter = Len(Str(siCount1))                          'siCounter = length of the string
  End If
Next
 
For siCount1 = 0 To sList.Max                               'For each item in sList
  If Len(sList[siCount1]) < siCounter Then                  'If the length of the string is less that siCounter then..
    sList[siCount1] &= Right(sList[siCount1], 1)            'Add the same digit to the string e.g. in list 1 "9" becomes "99", list 2 "54" becomes "544"
  End If
Next
 
sList.Sort(gb.Descent)                                      'Sort the list in decending order
 
For siCount1 = 0 To sList.Max                               'For each item in sList
  bTrigger = False                                          'Set bTrigger to False
  For siCount2 = 0 To iList.Max                             'Loop through each item in iList
    If Val(sList[siCount1]) = iList[siCount2] Then          'If the value of each is the same e.g. "98" = 98 then
      bTrigger = True                                       'Set bTrigger to True
      Continue                                              'Exit the loop
    Endif
  Next
  If Not bTrigger Then                                      'If there was no match e.g. there is no "99" then.. 
    sList[siCount1] = Left(sList[siCount1], siCounter - 1)  'Strip out the end digit e.g. "99" becomes 9 again
  End If
Next
 
Print Val(sList.Join(""))                                   'Join all items in sList together and print
 
End