Solving the Maximum Profit Stock Problem with One-Pass Approach