Because $|AB x AC| = |AB||AC|sin_{\theta}$, it’s the area of the parallelogram. Divide it by 2, it’s the area of the triangle!

Question:

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 2 3

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.