Form Biggest Number

whats wrong in this code?

@YashJ,
1
2
98 9
Your output: 989
Correct Output: 998

is this correct approach to solve this problem ? or I have to use some other method?

@YashJ,
Your approach was a little complicated instead of comparing the strings character by character. We can compare them as strings. https://ide.codingblocks.com/s/171499

1 Like

Hey, had a question when it will compare s with t they are of long type so how will it compare or how will it judge that 60 should be placed before 548 as numerically 548 is greater.