Visitar URL original
Added Rabin Karp Algorithm for Pattern Matching in Others folder by ReemaIsrani · Pull Request #461 · TheAlgorithms/Java · GitHub
The Wayback Machine - https://web.archive.org/web/20201103190409/https://github.com/TheAlgorithms/Java/pull/461
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Rabin Karp Algorithm for Pattern Matching in Others folder #461

Open
wants to merge 1 commit into
base: master
from

Conversation

@ReemaIsrani
Copy link

@ReemaIsrani ReemaIsrani commented Jul 14, 2018

No description provided.

Copy link
Collaborator

@christianbender christianbender left a comment

Good Work! I have some suggestions

/** Main Function **/
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

This comment has been minimized.

@christianbender

christianbender Jul 21, 2018
Collaborator

Please use the Scanner class for this art of inputs. See here

String text = br.readLine();
System.out.println("Enter Pattern\n");
String pattern = br.readLine();
RabinKarp r = new RabinKarp();

This comment has been minimized.

@christianbender

christianbender Jul 21, 2018
Collaborator

You don't need this lines. If you write the methods above as static

/** pattern length **/
private int len;

public void RabinKarpAlgo(String text, String pattern)

This comment has been minimized.

@christianbender

christianbender Jul 21, 2018
Collaborator

In Java method names are in camel case. For instance rabinKarpAlgo

@@ -0,0 +1,101 @@

import java.io.IOException;

This comment has been minimized.

@christianbender

christianbender Jul 21, 2018
Collaborator

You import this header but don't used it.

@varunu28
Copy link
Collaborator

@varunu28 varunu28 commented Aug 2, 2018

@ReemaIsrani Can you please do the changes requested? Otherwise you can close this PR and open a fresh one with changes implemented later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.