Test for a max subsequence algorithm