Given the coordinates of the vertices of an $n$-sided polygon $(x_0, y_0), (x_1, y_1), \ldots, (x_{n-1}, y_{n-1})$, can you calculate its area?

It turns out that a very simple formula exists to compute it, and it can be computed in $O(n)$: $$\mathrm{Area} = {1 \over 2}\left|\sum_{i=0}^{n-1} \left(x_i y_{i+1} - y_i x_{i+1}\right)\right|$$ where $(x_n, y_n)$ is understood to be the same as $(x_0, y_0)$.

This nice Mathologer video describes this formula and some explanations on why the formula works.