Persistent Systems Interview Question

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