Question DSA-STR-0066
HardIn KMP matching, a mismatch occurs at pattern index j > 0. Which pattern index is compared next with the same text character?
- A.
0
- B.
j − 1
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Strings question
In KMP matching, a mismatch occurs at pattern index j > 0. Which pattern index is compared next with the same text character?
0
j − 1
Sign up free to see the answer and a step-by-step explanation.
j + 1
lps[j − 1]