# Need more explanation about the problem

• How to get max profit 4 from input [3,2,6,5,0,3]?

• Buy it on day 2, price 2, sell it on day 3, price 6. Profix = 6 - 2 = 4

• Thanks. I misunderstood "at most one transaction" to be "buy one or sell one share"
(the actually meaning is "buy one and sell one share").

• We must buy it before sell it. And not buy and sell is also a solution, which get 0 profit.

• Er, well why don't you buy again on day 5 for price 0 and sell on day 6 to get a total profit of 7?

• Because you only have one transaction total in this problem. One transaction at a time is part of ii and iii.

• Oh, at first I read it the way the first commenter did, and then I thought it was a "one per day" limit. Thanks

• please add this testcase with explanations on the problem statement, the problem is really unclear

• For those who misunderstood this problem, check this post and upvote to get Leetcode admin notified.

• For those who misunderstood this problem, check this post and upvote to get Leetcode admin notified.

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.