Given an array of points on the X-Y plane points where points[i] = [xi, yi], return the area of the largest triangle that can be formed by any three different points. Answers within 10-5 of the actual answer will be accepted.
Example 1:
Input: points = [[0,0],[0,1],[1,0],[0,2],[2,0]] Output: 2.00000 Explanation: The five points are shown in the above figure. The red triangle is the largest.
Example 2:
Input: points = [[1,0],[0,0],[0,1]] Output: 0.50000
Constraints:
3 <= points.length <= 50-50 <= xi, yi <= 50Solutions for this problem are being prepared.
Try solving it yourself8 patterns to solve 80% Leetcode problems • Sahil & Sarra • 656,571 views views
Watch 9 more video solutions →Practice Largest Triangle Area with our built-in code editor and test cases.
Practice on FleetCodePractice this problem
Open in Editor