def beating_stock2(array):

    deal = 0
    min_value = array[0]

    for i, d in enumerate(array):

        deal_here = d - min_value

        if deal > deal_here:
            deal = deal_here

        else:
            if min_value > array[i]:
                min_value = array[i]

    return deal
dataset/ETHPy150Open bt3gl/Python-and-Algorithms-and-Data-Structures/src/builtin_structures/max_subarray_stocks.py/beating_stock2/swapped operands of `>`