Largest Triangle Area Problem

Largest Triangle Area Problem — ExecCode Easy DSA Practice

Solve the Largest Triangle Area problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are 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. Your task is to answers within 10^-5 of the actual answer will be accepted. Return the required answer exactly as shown in the examples.

Examples

Input {"points": [[0, 0], [0, 1], [1, 0], [0, 2], [2, 0]]}; Output 2.0. Input {"points": [[1, 0], [0, 0], [0, 1]]}; Output 0.5

Constraints

3 <= points.length <= 50 -50 <= xi, yi <= 50 All the given points are unique.

Practice Largest Triangle Area free on ExecCode. Browse DSA problems, topic map, and placement guides.