KMP Algorithm
1. What is the time complexity of the preprocessing function for a pattern of length M?
2. What is the longest-prefix-suffix length for: 'ANIDAPOPOANIDA'?
3. Which of the following is the main purpose of the LPS array in KMP preprocessing?
4. Which of the following is NOT a valid step in the KMP preprocessing phase?
5. What is the space complexity of the LPS array for a pattern of length M?