Persistent Systems interview question

To write code for greatest number formed by digits in a given array.