← Amazon questions

Maximum profit by buying and selling a share at most k times

Filed under Amazon · Also reported at Groww, Morgan Stanley, Oracle

Find the maximum profit you can achieve by completing at most k transactions (buy one and sell one share of stock multiple times) with given array prices where prices[i] is the price of a given stock…

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.