Tableau Software interview question

Well known stock maximizing algorithm