131k views
3 votes
How many unique triangles can be drawn with side lengths 5 inches 15 inches and 30 inches

User Verdigrass
by
7.5k points

1 Answer

6 votes

Answer:

Explanation:

The idea is, for each triangle, sort all of its sides and then store it in a map, if all those three sides are already present in the map then increase the frequency by 1, else its frequency will be 1. The count of elements of the map which have frequency 1 in the end will be the answer.

User Zoonosis
by
7.7k points