Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the array.
Use greedy algorithm. If we select an edge as the longest side, it is always better to pick up all the edges with length no longer than this longest edge.
Note that the number of edges should not be less than 3.