Skip to content

Latest commit

 

History

History

StockMarket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Problem definition

Given an array in which the ith element is the price of a given stock on day i, what is the maximum profit can be gained? At most one transation (buy and once and sell once) is allowed. A stock cannot be sold before buying it.