Amazon Interview Question

Calculate out a maximum subsequence of the array.