← Oracle questions

Maximum profit with at most 2 stock transactions

Filed under Oracle

You are given an array prices where prices[i] is the price of a given stock on the i-th day. Find the maximum profit you can achieve with at most two transactions. You may not engage in multiple…

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 Oracle questions

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