buy_sell_stock

Solution

	
	from typing import List

def max_profit(prices: List[int]) -> int:
    pass

	

Tests

	
	import pytest

from publicmatt.leet.problems.buy_sell_stock import max_profit


@pytest.mark.parametrize(
    "prices,price",
    [([7,1,5,3,6,4], 5), ([7,6,4,3,1], 0)]
)
def test_max_price(prices, price):
    assert max_profit(prices) == price

	
buy_sell_stock