This question evaluates algorithm design and optimization skills, focusing on reasoning about stateful dynamic programming or greedy strategies to maximize stock-trading profit when each sell incurs a transaction fee.

Given an array of daily stock prices and a fixed transaction fee charged on each sell, compute the maximum profit achievable with any number of buy–sell transactions. Provide an O(n) time, O(