← Accolite questions

Maximum Profit from Share Trading at Most Twice

Filed under Accolite

Given an array of daily share prices, find the maximum profit that can be made by buying and selling shares at most twice, with the constraint that a second transaction can only start after the first…

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

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