from typing import Any


def linear_search(lst: list, x: Any) -> int:
    """Return the index of the first element of `lst` equal to `x`, or -1 if no
    elements of `lst` are equal to `x`.

    Design idea: Scan the list from start to finish.

    Complexity: O(n) time, O(1) space.

    For an improvement on linear search for sorted lists, see the binary search
    function in the decrease_and_conquer module.
    """
    for i, y in enumerate(lst):
        if x == y:
            return i
    return -1