Implement KMP (Knuth-Morris-Pratt) string matching: (1) Build LPS (Longest Proper Prefix which is also Suffix) array, (2) Search pattern in text using LPS to skip comparisons. Dry run on text="ABABDABACDABABCABAB", pattern="ABABCABAB". Show LPS array construction step by step. Compare with naive O(nm) approach.