Single File Programming Question Given an array of stick lengths, use 3 of them to construct a non-degenerate triangle with the maximum possible perimeter. Retum an array of the lengths of its sides as 3 integers in non decreasing order If there are several valid triangles having the maximum perimeter Choose the one with the longest maximum side 2. If more than one has that maximum, choose from them the one with the longest minimum side 3. if more than one has that maximum as well, print anyone thern If no non degenerate triangle taxistireturn I-1] Example sticks - [1, 2, 3, 4, 5, 101 The toplet (1,2,3) will not commande Noithat will (4,5; 10) or (2, 3, 5), so the problem is reduced to (2, 345) The longan pemeran 4 5 12 Sample input O 5
Answers
Answered by
0
Answer:
9273737382827366373828
Explanation:
8237+29736+3938764+393837
Similar questions