Search
⌘K

Leetcode 714. Best Time to Buy and Sell Stock with Transaction Fee

Given daily prices and a per-transaction fee, maximize profit from any number of buy-sell operations (you cannot hold multiple shares at once) where each completed trade incurs the fee. This is a 2-state DP/greedy optimization — track best "hold" and "cash" values each day to decide buys/sells while accounting for the fee.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.