Working extreme subsequence