can not under the compare function .
code -->https://ide.codingblocks.com/s/20737
can someone plz clarify this???
Form biggest under array
hello @rahulparida933
Given two numbers X and Y, how should mycmp() decide which number to put first – we compare two numbers XY (Y appended at the end of X) and YX (X appended at the end of Y). If XY is larger, then X should come before Y in output, else Y should come before. For example, let X and Y be 542 and 60. To compare X and Y, we compare 54260 and 60542. Since 60542 is greater than 54260, we put Y first.
so this line ![]()
is checking whether number xy is greater than YX or not ,if it is then function will return true and swapping will not happen.
otherwise function will return false and in that case x and y will swap its position.
note x-> a , y->b( same thing)
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.