First version of the Maximum subarray problem.

Added the codes to handle arrays with all-none-positive elements.