Sequence Pattern Matching Leetcode Solutions Cpp