Added implementation of maximum subsequence