OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project
http://internship.opengenus.org
GNU General Public License v3.0
13.53k stars 3.66k forks source link

knuth-morris-pratt algorithm #6356

Open soundaryasenthil02 opened 2 years ago

soundaryasenthil02 commented 2 years ago

This is a(n):

Details: Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may assume that n > m.

ujjwall-R commented 1 year ago

I can solve this using KMP algorithm in C++. Please assign me this issue.