import torch


def box_area(boxes: torch.Tensor) -> torch.Tensor:
    """
    Computes the area of a set of bounding boxes, which are specified by their
    (start, end) coordinates.

    Args:
        boxes (Tensor[N, 2]): boxes for which the area will be computed. They
            are expected to be in (start, end) format with
            ``0 <= start < end``.

    Returns:
        Tensor[N]: the area for each box
    """
    return (boxes[:, 1] - boxes[:, 0])