Best Day to Buy and Sell
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- easy
- Pro
You're given a stock's price for each day. You may buy once and sell once on a later day. Find the largest profit you could make, or zero if prices only fall. Explain your approach and its cost.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.