[mod] refactor maximum consecutive subsequence