def _index(bsp_string: str) -> int:
    """Finds the position of a seat (row or col) given the bsp string representation."""
    high = 2 ** len(bsp_string) - 1  # - 1 to shift from length to index
    low = 0

    for instruction in bsp_string:
        if instruction in ("B", "R"):
            low += (high-low+1)/2
        elif instruction in ("F", "L"):
            high -= (high-low+1)/2

    return int(high)