ING Interview Question

code problem 2 - maximum profit by buying and selling a stock