You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To find the largest triangle area, we need to check all possible combinations of 3 points from the given set and calculate their areas. The triangle with the maximum area is our answer.
5
+
6
+
# Approach
7
+
Use a brute force approach to generate all possible triangles by selecting 3 points from the input array. For each combination, calculate the triangle area using the cross product formula: `|x1(y2-y3) + x2(y3-y1) + x3(y1-y2)| / 2`. Keep track of the maximum area found and return it.
0 commit comments