How to solve this problem?

not able to get the logic of forming the largest number in the given array.