Can anyone explain me the working of this program?

The program is for forming biggest number from an array of integers.

I am unable to unuderstand how string comparison is producing right and as far as I know string comparison works on ASCII values of individual characters.

Also if someone can suggest me a better approach of this question.

https://codeshare.io/aYqW0N

@vikanshu2016 Yes it does so on basis of individual characters , but does so in a loop, going from left to right .
In simple, all string comparison algorithm will follow the lexicographical order or dictionary order, which means it will check each character by character, if some mismatches, you can decide the result

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.