This preview shows page 1. Sign up to view the full content.
Unformatted text preview: of running your implementation. (This means that youll hand in a written answer to this queston as well as the usual implementation.) The function to call in order to run your algorithm should be called plan , and the input for it should be a list of stock prices describing [ p ( 1 ) , p ( 2 ) , . . . , p ( n )] , for example [ 45, 42, 50, 48, 51, 44 ] . You may assume the prices are integers. Your function should return a pair a , b with the interpretation buy on day a , sell on day b . 1...
View Full Document
- Spring '08