def maxProfit(self, A):
        if len(A) <= 1:
            return 0

        n = len(A)
        F = [0 for _ in xrange(n+1)]
        maxa = 0
        for i in xrange(2, n+1):
            F[i] = max(F[i-1] + A[i-1] - A[i-2], 0)  # revert the previous transaction
            maxa = max(maxa, F[i])

        return maxa
Take in the return and shove it into the couchdb database.
dataset/ETHPy150Open algorhythms/LeetCode/122 Best Time to Buy and Sell Stock.py/Solution.maxProfit--crossover with--dataset/ETHPy150Open saltstack/salt/salt/returners/couchdb_return.py/returner