def minmax_seq(a):
    """Find mix & max in a list by sequential algorithm.

    - Time complexity: O(n).
    - Space complexity: O(1).
    """
    if a[0] < a[1]:
        cur_min, cur_max = a[0], a[1]
    else:
        cur_min, cur_max = a[1], a[0]

    for i in range(2, len(a), 2):
        if i + 1 < len(a):
            if a[i] < a[i + 1]:
                _min, _max = a[i], a[i + 1]
            else:
                _min, _max = a[i + 1], a[i]
        else:
            _min, _max = a[i], a[i]

        if _min < cur_min:
            cur_min = _min
        if _max > cur_max:
            cur_max = _max

    return [cur_min, cur_max]