AlgoScope

Polygon Area

Half the absolute sum of cross products of consecutive vertices, the shoelace formula.

Computational geometry, algorithm, intermediateAlso called shoelace formula
Term -5, sum -5.ABCDE
Term -5, sum -5.ABCDE

Plane Geometry: Shoelace area of a pentagon

Decision, step 2 of 7

Edge AB: 1 x 2 - 7 x 1 = -5. Running sum -5.

How plane geometry works

Cost

Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(1)

Taught by the same lesson

Plane Geometry covers these too, in the same run.