buy-sell-stock-returns-zero-for-no-profit

Status: IN

When no profitable transaction exists (monotonically decreasing prices), `maxProfit` returns `0`, never a negative number.

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

JSON