← Walmart questions

Stock buy and sell single transaction max profit and max loss

Filed under Walmart

Given an array of daily stock prices, find both the maximum possible gain (buy low, sell high) and the maximum possible loss (buy high, sell low) achievable with a single purchase and subsequent sale…

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

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