Simple Max Difference
Filed under Athenahealth
The question
Given an array of stock prices, find the maximum profit spread (difference between a price and a previous price). Return -1 if prices are flat or decreasing.
No write-up yet. Related questions below have one.
Related Athenahealth questions
Collected from public candidate posts and coding forums. Updated Nov 2026.