Frage im Vorstellungsgespräch bei Starbucks

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