Form Biggest Number HB

https://hack.codingblocks.com/contests/c/474/1291
https://ide.codingblocks.com/#/s/24384

Reversing the array wont give correct answer. It just works for input case
Try cases like
4
10 30 20 40

Expected output
40302010
Your output
40203010

Think about it more, and if you are not able to, i will post my solution for this.

thanx.
passed the test case