Question d’entretien chez Starbucks

Write a function in Python or R to identify days to buy/sell stock