We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f9c5df commit bdd4d62Copy full SHA for bdd4d62
src/main/java/com/thealgorithms/others/StringMatchFiniteAutomata.java
@@ -1,6 +1,5 @@
1
package com.thealgorithms.others;
2
3
-import java.util.Scanner;
4
import java.util.Set;
5
import java.util.TreeSet;
6
@@ -21,21 +20,6 @@ public final class StringMatchFiniteAutomata {
21
20
private StringMatchFiniteAutomata() {
22
}
23
24
- public static void main(String[] args) {
25
- // Scanner instance for user input
26
- try (Scanner scanner = new Scanner(System.in);) {
27
-
28
- System.out.println("Enter text:");
29
- String text = scanner.nextLine();
30
31
- System.out.println("Enter pattern:");
32
- String pattern = scanner.nextLine();
33
34
- Set<Integer> indexFound = searchPattern(text, pattern);
35
- indexFound.forEach(System.out::println);
36
- }
37
38
39
/**
40
* Searches for the pattern in the given text using finite automata.
41
*
0 commit comments