โ† Amazon questions

Maximum profit from multiple stock transactions

Filed under Amazon

Given an array of prices where prices[i] is the price of a stock on day i, find the maximum profit by making as many transactions as you like.

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.