Sequence Pattern Matching Leetcode Rating