← Amazon questions

Stock profit maximization

Filed under Amazon · Also reported at Oracle, Walmart

Given an array of stock prices, find the maximum profit possible for two scenarios: 1) Single transaction (buy one, sell one), 2) Unlimited transactions (buy and sell multiple times).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.