← Amazon questions
CodingReported in a candidate post, May 2022

KMP String Matching Algorithm

Filed under Amazon

Implement the Knuth-Morris-Pratt (KMP) string matching algorithm to find the first occurrence of a pattern string in a text string. The solution must achieve linear time complexity by utilizing a…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.