Lecture 22 completes linear-time pattern matching using the Z-algorithm