from typing import List


def get_diffs(adapters: List[int]) -> List[int]:
    """Sort a list and return the differences between consecutive elements."""
    adapters = sorted(adapters)
    diffs = []
    for i, level in enumerate(adapters[1:], start=1):
        diffs.append(level-adapters[i-1])
    return diffs