As a team leader, real world answer would be to split this into technical subproblems, suggest approaches and help PM with assigning them to you fellow team members ;-D
Hahaha... No.
0. Guess out that max will be if you put biggest digit in front.
1. Make list L from N (N % 10, N :=N // 10).
2. Find max M in L and swap L[len(L)-1] with L[M]
3. Make N back from list (N += L[i] * (10**i))