OpenGenus / cosmos

World's largest Contributor driven code dataset | Used in Quark Search Engine, @OpenGenus IQ, OpenGenus Visual Project

Home Page:http://internship.opengenus.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

knuth-morris-pratt algorithm

soundaryasenthil02 opened this issue · comments

This is a(n):

  • New algorithm
  • Update to an existing algorithm
  • Error
  • Proposal to the Repository

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.

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