2041: KMP algorithm