Why this is showing wrong answer, i tried many cases working fine

hey @ashishnnnnn
u do not have to do so much computation in this question

refer to this

https://ide.codingblocks.com/s/224707

u need to simple compare

bool compare(string x, string y)
{
	string xy = x.append(y);
	string yx = y.append(x);

	return xy.compare(yx) > 0 ? true : false;
}

I am not familier with these comparators…First i should read about these…

Could you point…where it is explained in the course…

yes u can also check out prateeek bhaiyas video
and u should definetely learn about them ( very usefull)

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.

1 Like