If the three sides are a,b,c 1. sum of length of any two sides of a triangle, always exceeds the third side. So, this can be taken as the first test case, to see if a,b,c form a triangle. 2.if any of the two sides a,b,c are equal- its isoceles triangle 3.in an obtuse triangle, sum of square of 2 sides should be less than the third side 4. if a, b and c are all different, then it is a scalene triangle.
for the duster case, I think this might help http://www.geekinterview.com/question_details/29384 On Jul 29, 2:36 am, Umer Farooq <[email protected]> wrote: > Is that from a phone interview of MS? :-| > > On Fri, Jul 29, 2011 at 2:32 PM, Puneet Gautam <[email protected]>wrote: > > > > > > > > > > > Hey everyone , pls tell me how testcases of following: > > > 1. 3 sides of a triangle are taken, output whether its obstuse, > > scalene,isosceles..? > > 2. testcases of a duster... > > > I know nothing about testcases, so pls reply accordingly..!! > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. > > -- > Umer -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
