Quantum Algorithm for Anomaly Detection of Sequences