((s1+s2)>(s2+s1)) are these string converted to int for comparison?

does ’ > ’ this convert every string to int?

Hey @abhigyanprakash29
No intger doesnt come into play here
“+” will join both strings say we had 12 and 123
then 12+123 ==12123

so 12123 > 12312 now since we are comparing strings it will match char by char
So compare 1 with 1 then 2 with 2 then 1 with 3 since ascii of 1 is smaller than 3 so this return false

1 Like

ooo thanks alot brother

1 Like