·
44 commits
to main
since this release
First of all we take two integar as maximum profit whic is initially set to be zero and minimum so far which is the first element of the prices then we traverse and found the minimum between the minsofar and prices then we calculate the profit among them. then we find out the max between the maxprofit and calculated profit.