DSA learning series, getting WA in week 0 problem

Problem link - CodeChef: Practical coding for everyone
My solution - CodeChef: Practical coding for everyone

Help and suggestion will be appreciated :smile:

It probably depends a lot on whether the Problem setter considers e.g.

5 5 10

to form a triangle. Your solution assumes it does; the setter might consider that it doesn’t. Try that :slight_smile:

1 Like

Yes, that worked. Thanks !!

1 Like

You need to check side1<side2+side3, side2<side1+side3 and side3<side1+side2

When I compared the max of (a,b,c) with other 2 values, then it got accepted.

look i would personally suggest you to write a bit more neat code…like for this solution sorting was not required…you could have easily checked for different cases using simple if…else
Here is my solution CodeChef: Practical coding for everyone

1 Like

thanks