buy-sell-stock-single-pass-greedy

Status: IN

`maxProfit` runs in O(n) time and O(1) space by tracking the running minimum price — a Kadane's-style greedy pattern.

Source: entries/2026/06/06/best-time-to-buy-and-sell-stock-solution.md

JSON