[Add]implementation for KMP algorithm