# Tag Info

I've copied below the wikipedia algorithm for computing the LPS array (which is usually called the failure function because in the main KMP algorithm you refer to this table whenver there's a failed match). They denote $T[]$ where you use $LPS[]$ algorithm kmp_table: input: an array of characters, W (the word to be analyzed) an ...