Oracle Interview Question

Buy and Sell Stock problem.