Point72·Software Engineer·Online Assessment (OA)
- Implement a Python decorator called 'validate_prices' that checks a stock prices array against defined input constraints before processing.
- Write a function 'find_transactions' that takes a stock prices array and returns a list of tuples containing buy day, buy price, sell day, sell price, and profit for each transaction to maximize total profit.
- Build a 'generate_report' function that prints a formatted summary of all transactions and the total profit.
“I don't write decorators from scratch that often so I had to think for a second about the wrapper function structure.”