there is a stock company whose stock prices are known to u for next 365 
days. u have to write the code on which day u should buy and sell the 
stock. U cannot sell a stock until you haven't bought any stock.

my approach was to buy the stock when the stock prices are the lowest and 
sell them when they are the highest. But i think am missing something 
because this question was for a considerable amount of marks but the 
solution is too obvious! any thoughts ? 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/Qw0NRAP_TtwJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to