What is the difference in kmp and s.find

like in kmp we can find the occurence of a substring in a string effeciently , but the same can be done by s.find() , so why basically we use kmp ??

hi @aryan_007 all the inbuilt functions are using some or the other algorithm only.

so what are the major uses of kmp and in what kind of questions we can apply it ?

@aryan_007 its use is to search for pattern in a string, it can be used in various types of questions as and when required. You are right that s.find() will also do the same thing but it is important to know the underlying algorithm used.

okayy , thankyou so much

@aryan_007 dont forget to mark the doubt as resolved!